Add-WssBackupVolume

Add-WssBackupVolume

Add a volume to a scheduled backup policy.

Syntax

Parameter Set: Default
Add-WssBackupVolume [-BackupPolicy] <ScheduledBackupPolicy> [-BackupVolume] <BackupVolume> [ <CommonParameters>]

Detailed Description

The Add-WssBackupVolume cmdlet adds a volume to a scheduled backup policy. Use the cmdlet to add volumes and the files they contain to a backup.

Parameters

-BackupPolicy<ScheduledBackupPolicy>

Specifies the scheduled backup policy to which to add the volume.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-BackupVolume<BackupVolume>

Specifies the volume to add to the scheduled backup policy.

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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

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

Outputs

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

Examples

Example 1: Add a backup volume to a backup policy

This example adds a backup volume to scheduled backup policy.

The first command gets the current backup policy for the computer, makes it editable, and stores it in the variable named $ContosoBUPolicy24.

The second command creates a backup volume from drive F: and stores it in the variable named $ContosoEmpData10.

The third command adds the backup volume that is stored in $ContosoEmpData10 to the scheduled backup policy that is stored in $ContosoBUPolicy24.

PS C:\> $ContosoBUPolicy24 = Get-WBPolicy -Editable
PS C:\> $ContosoEmpData10 = Get-WBVolume –VolumePath F:\
PS C:\> Add-WssBackupVolume -BackupPolicy $ContosoBUPolicy24 -BackupVolume $ContosoEmpData10

Get-WssBackupVolume

Remove-WssBackupVolume