New-WssBackupTarget

Creates a backup target from a backup disk.

Syntax

New-WssBackupTarget
   [-Disk] <BackupDisk>
   [[-Label] <String>]
   [-PreserveExistingBackups]
   [<CommonParameters>]

Description

The New-WssBackupTarget cmdlet creates a backup target from a backup disk. A backup target defines storage locations for backups.

Examples

Example 1: Create a backup target from a backup disk

PS C:\> New-WssBackupTarget -Disk $disks[1] -Label "Backup Disk 1" -PreserveExistingBackups

This command creates a backup target labeled Backup Disk 1 from the second item, located in position 1, of the array that is stored in the $disks variable.

Parameters

-Disk

Specifies the backup disk that stores backups.

Type:BackupDisk
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Label

Specifies the label for the backup storage location.

Type:String
Position:1
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PreserveExistingBackups

Indicates that the cmdlet keeps existing backups on the disk in the BackupDisk parameter when the cmdlet adds a new backup to the disk.

Type:SwitchParameter
Position:2
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.WindowsServerSolutions.DataProtection.ServerBackup.ObjectModel.BackupTarget

This cmdlet generates the backup target.