Add-WssBackupVolume
Add a volume to a scheduled backup policy.
Syntax
Add-WssBackupVolume
[-BackupPolicy] <ScheduledBackupPolicy>
[-BackupVolume] <BackupVolume>
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.
Examples
Example 1: Add a backup volume to a backup policy
PS C:\>$ContosoBUPolicy24 = Get-WBPolicy -Editable PS C:\>$ContosoEmpData10 = Get-WBVolume -VolumePath F:\ PS C:\>Add-WssBackupVolume -BackupPolicy $ContosoBUPolicy24 -BackupVolume $ContosoEmpData10
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.
Parameters
-BackupPolicy
Specifies the scheduled backup policy to which to add the volume.
Type: | ScheduledBackupPolicy |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-BackupVolume
Specifies the volume to add to the scheduled backup policy.
Type: | BackupVolume |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |