Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Add-WBVolume

Windows Server 2012 R2 and Windows 8.1

Updated: October 17, 2013

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

Add-WBVolume

Adds the list of source volumes to the backup policy.

Syntax

Parameter Set: Default
Add-WBVolume [-Policy] <WBPolicy> [-Volume] <WBVolume[]> [ <CommonParameters>]




Detailed Description

The Add-WBVolume cmdlet adds a list of source volumes to a WBPolicy object.

To use this cmdlet, you must be a member of the Administrators group or Backup Operators group.

Parameters

-Policy<WBPolicy>

Specifies a WBPolicy object that contains the backup policy to update.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Volume<WBVolume[]>

Specifies an array of volumes to add to the WBPolicy object.


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

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

Inputs

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

  • WBVolume [], WBPolicy

    The Add-WBVolume cmdlet accepts WBVolume objects, which contain a new list of source volumes for the backup, and WBPolicy objects as input.


Outputs

The output type is the type of the objects that the cmdlet emits.

  • WBVolume[]

    The Add-WBVolume cmdlet outputs the list of WBVolume objects in the WBPolicy object, including the WBVolume objects that the cmdlet just added.


Notes

  • The WBPolicy object must be in edit mode. To put the WBPolicy object in edit mode for a policy that you set as the scheduled backup policy, use the Get-WBPolicy cmdlet with the Editable parameter. The New-WBPolicy cmdlet creates a new WBPolicy object that is already in edit mode.

Examples

Example 1: Add a list of volumes to a backup policy

This example adds a list of volumes for backup to the WBPolicy object.

The first command stores the output of the Get-WBVolume cmdlet in the variable named $Volumes.

The second command calls the Get-WBPolicy cmdlet and assigns the result to the $Policy variable.

The third command adds the volumes in the $Volumes variable to the backup policy.


PS C:\> $Volumes = Get-WBVolume
PS C:\> $Policy = Get-WBPolicy
PS C:\> Add-WBVolume -Policy $Policy -Volume $Volumes

Related topics

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.