Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

New-WBBackupTarget

New-WBBackupTarget

Creates a new WBBackupTarget object.

Ee706652.Important(en-us,TechNet.10).gifImportant
Windows Server Backup cmdlets do not support backing up to removable media, such as DVDs, for any type of backup—scheduled or one-time. To save backups to removable media, you should use either the Wbadmin command or the wizards in the Windows Server Backup user interface.

For more information about creating backups by using the command, see Wbadmin, (http://go.microsoft.com/fwlink/?LinkId=188671). For more information about creating backups by using the user interface, see Backing Up Your Server (http://go.microsoft.com/fwlink/?LinkId=188670).

Syntax

New-WBBackupTarget [-Disk] <WBDisk> [[-Label] <string>] [<CommonParameters>]

New-WBBackupTarget [-NetworkPath] <string> [[-Credential] <PSCredential>] [-NonInheritAcl] [<CommonParameters>]

New-WBBackupTarget [-Volume] <WBVolume> [<CommonParameters>]

New-WBBackupTarget [-VolumePath] <string> [<CommonParameters>]

Detailed Description

The New-WBBackupTarget cmdlet creates a new WBBackupTarget object based on the parameters that you specify. The WBBackupTarget object is used to define the locations where backups are stored.

Parameters

-Credential <PSCredential>

Specifies the username and password for a user account that has permissions to access the location where backups are stored.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByValue)

Position?

2

-Disk <WBDisk>

Specifies the disk (WBDisk object) to use to store backups.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

1

-Label <string>

Specifies the label for the backup storage location (WBBackupTarget object).

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

2

-NetworkPath <string>

Specifies the path for the remote shared folder to use to store the backups.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

1

-NonInheritAcl <SwitchParameter>

Applies the access control list (ACL) permissions that correspond to the credentials specified to \\<servername>\<sharename>\WindowsImageBackup\<ComputerBackedUp>\ (the folder that contains the backup). To access the backup later, you must use these credentials or be a member of the Administrators group or the Backup Operators group on the computer with the shared folder. If this parameter is not used, the ACL permissions from the remote shared folder are applied to the <ComputerBackedUp> folder by default so that anyone with access to the remote shared folder can access the backup.

We recommend that you use the NonInheritAcl parameter to store backups.

This parameter is applicable to one-time backups only - not to scheduled backups.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

3

-Volume <WBVolume>

Specifies the volume (WBVolume object) to use to store the backups.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByValue)

Position?

1

-VolumePath <string>

Specifies the drive letter of the volume to be used to store backups.

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.

Notes

  • You can specify the storage location in one the following ways:

    1. -Disk WBDisk object

      Use if the storage location is a disk. Use the Get-WBDisk cmdlet to see what disks are available and then specify the disk that you want to use.

    2. -NetworkPath networkpath string

      Use if the storage location is a remote shared folder (network). The network path can be a string. You can use the -NonInheritAcl parameter for this type of storage location, but for one-time backups only. You can also use the -Credential parameter to specify who can access the backups.

    3. -Volume WBVolume object

      Use if the storage location is a volume. You should get a list of all volumes available using the Get-WBVolume -Allvolumes cmdlet. Then, choose the WBVolume object to specify as the storage location.

      This is the only method by which Universal Naming Convention (UNC) path volumes, which are not mounted, can be specified as the backup storage location.

    4. -VolumePath volumedriveletter: string

      Again, use if the storage location is a volume. You can directly specify the volume drive letter (for example, -VolumePath e:) for the volume to use as the backup storage location without using the Get-WBVolume cmdlet first.

  • If you save a backup to a remote shared folder, that backup will be overwritten if you use the same folder to back up the same computer again. In addition, if the backup operation fails, you may end up with no backup because the older backup will be overwritten, but the newer backup will not be usable. You can avoid this by creating subfolders in the remote shared folder to organize your backups. If you do this, the subfolders will need twice the space of the parent folder.

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

Examples

EXAMPLE 1

C:\PS>$disks = Get-WBDisk 
$diskBackupLocation = New-WBBackupTarget -Disk $disks[1] -Label "Backup Disk 1"

The WBBackupTarget object using an entire disk as a backup location.

Description

-----------

Creates a WBBackupTarget object that uses the specified disk, Backup Disk 1, as the backup target. The disk will be available to store backups only when the WBPolicy object in which the WBBackupTarget is added is set using the Set-WBPolicy cmdlet. Multiple disks for storage can be added to the backup policy (WBPolicy object).

EXAMPLE 2

C:\PS>$cred = Get-Credential 
$networkBackupLocation = New-WBBackupTarget -NetworkPath \\servername\share -Credential $cred

The WBBackupTarget object using remote shared folder as a backup location.

Description

-----------

Creates a WBBackupTarget object that uses a remote shared folder, \\servername\share, as the backup storage location and the credentials, $cred, needed to access the shared folder. If you are using a remote shared folder, only one backup location can be added to the backup policy (WBPolicy object).

EXAMPLE 3

C:\PS>$volumeBackupLocation = New-WBBackupTarget -VolumePath D:

The WBBackupTarget object using a volume as a backup location.

Description

-----------

Creates a WBBackupTarget object that uses a volume, D:, as the backup storage location. Multiple volumes for storage can be added to the backup policy (WBPolicy object).

EXAMPLE 4

C:\PS>$volumeList = Get-WBVolume -AllVolumes 
$volumeBackupLocation = New-WBBackupTarget -Volume $volumeList[3]

The WBBackupTarget object using a volume as a backup location.

Description

-----------

Creates a WBBackupTarget object that uses a volume, $volumeList[3], as the backup storage location. Multiple volumes for storage can be added to the backup policy (WBPolicy object).

See Also

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