Export (0) Print
Expand All

Add-WBBackupTarget

Add-WBBackupTarget

Adds the WBBackupTarget object, which specifies backup storage locations, to the backup policy (WBPolicy object).

Syntax

Add-WBBackupTarget [-Policy] <WBPolicy> [-Target] <WBBackupTarget> [-Force] [<CommonParameters>]

Detailed Description

The Add-WBBackupTarget cmdlet adds the WBBackupTarget object, which specifies backup storage locations, to the backup policy (WBPolicy object). To use this cmdlet, you must first use the New-WBBackupTarget cmdlet to create a WBBackupTarget object. You can then use the Add-WBBackupTarget cmdlet to specify the storage location as either a disk, volume, or remote shared folder (network) location. Only one storage type can be added to the policy at any time. In addition, if you specify a shared folder, you cannot add more locations - you can only specify one shared folder as a storage location at any time. However, you can specify multiple disks or volumes at one time by calling Add-WBBackupTarget for each location.

Parameters

-Force <SwitchParameter>

Specifies to not prompt the user for confirmation.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

3

-Policy <WBPolicy>

Specifies the backup policy (WBPolicy object) to update.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

1

-Target <WBBackupTarget>

Specifies the backup storage location to add to the backup policy.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

2

-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

  • If you specify a disk as a storage location for backups, the disk will be formatted before use, and any existing data on it is permanently erased.

  • The WBPolicy object must be in edit mode. To put the WBPolicy object in edit mode for a policy that has been 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.

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

Examples

EXAMPLE 1

C:\PS>Add-WBBackupTarget -Policy $policy -Target $backupLocation

An updated list of backup storage locations in the policy $policy.

Description

-----------

Adds the backup storage location $backupLocation to the WBPolicy object $policy. The $backupLocation object can be created using the New-WBBackupTarget cmdlet.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft