Get-WBVolume

Get-WBVolume

Gets the list of source volumes for the backup that is included in the backup policy (WBPolicy object).

Syntax

Get-WBVolume -AllVolumes [<CommonParameters>]


Get-WBVolume -CriticalVolumes [<CommonParameters>]


Get-WBVolume [-Disk] <WBDisk> [<CommonParameters>]


Get-WBVolume [-Policy] <WBPolicy> [<CommonParameters>]


Get-WBVolume [-VolumePath] <string[]> [<CommonParameters>]

Detailed Description

The Get-WBVolume cmdlet gets a list of volumes based on the parameters that you specify. You can use this cmdlet to display volumes included in the backup policy (WBPolicy object) all critical volumes, all volumes, or volumes in the WBDisk object. This cmdlet can also be used to get a WBVolume object of a volume using the drive letter of that volume.

Parameters

-AllVolumes <SwitchParameter>

Specifies to list all volumes included in the backup policy.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

1

-CriticalVolumes <SwitchParameter>

Specifies to list only all critical volumes (volumes that contain operating system files and components) in the backup policy.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

1

-Disk <WBDisk>

Specifies to only list volumes associated with a certain disk.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

1

-Policy <WBPolicy>

Specifies the backup policy (WBPolicy object) to display information for.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

1

-VolumePath <string[]>

Specifies to display the volume drive letter for the volume where the backups will be stored.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

1

-CommonParameter

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. For more information, see about_CommonParameters.

Input and Return Types

The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.

Input Type

The Get-WBVolume cmdlet queries the backup policy (WBPolicy object) and the WBDisk object, and references a string which specifies a path to volumes where backups will be stored. Depending on the input parameters the Get-WBVolume cmdlet can be used to:

In addition, the get-WBVolume cmdlet can be used with the parameters -CriticalVolumes and -AllVolumes to get the WBVolume list of all critical volumes on the system and all the volumes on the system, respectively.

Notes

  • The volumes that you get using Get-WBVolume can be added to the WBPolicy object using the Add-WBVolume cmdlet to specify them as volumes to be backed up, or using the New-WBBackupTarget cmdlet to specify them as backup storage locations.

  • To use Windows Server Backup cmdlets, you must be a member of the Administrators group or Backup Operators group.

Examples

EXAMPLE 1

C:\PS>Get-WBVolume -Disk $disks[0]

A list of volumes present on the disk specified by WBDisk : $disk[0].

Description

-----------

Gets all volumes present on a particular disk. To do this, get the list of all disks on the system by running the command $disk = Get-WBDisk. Then, this example can be used to get all the volumes present on the first disk in that list.

EXAMPLE 2

C:\PS>Get-WBVolume -Policy $policy

A list of volumes that has been specified to be backed up.

Description

-----------

Gets the list of all volumes that have been added for backup in the WBPolicy object $policy.

EXAMPLE 3

C:\PS>Get-WBVolume -VolumePath E:

The WBVolume object that corresponds to the volume with drive letter "E:".

Description

-----------

Gets the WBVolume object for the volume with drive letter "E:".

EXAMPLE 4

C:\PS>Get-WBVolume -AllVolumes

A list of all the volumes present on the computer.

Description

-----------

Gets the list of WBVolume objects of all the volumes present on the computer.

EXAMPLE 5

C:\PS>Get-WBVolume -CriticalVolumes

A list of all the critical volumes present on the computer.

Description

-----------

Gets the list of all the critical volumes (volumes that contain operating system components and files) present on the computer.

See Also

Reference

New-WBVolume
Get-WBPolicy