Table of contents
TLS
TOC
Collapse the table of content
Expand the table of content

Get-WBBackupTarget

Last Updated: 4/3/2017

SYNOPSIS

Gets backup storage locations that you specified as part of a backup policy.

SYNTAX

Get-WBBackupTarget [-Policy] <WBPolicy> [<CommonParameters>]

DESCRIPTION

The Get-WBBackupTarget cmdlet gets backup storage locations that you specified for a WBPolicy object that contains a backup policy. Valid locations include disks, volumes, or remote shared folders. To view the list of all online disks, use the Get-WBDisk cmdlet.

You can add the locations that the cmdlet returns to a WBPolicy object by specifying them as backup storage locations to the New-WBBackupTarget cmdlet.

To use this cmdlet, you must be a member of the Administrators group or Backup Operators group.

EXAMPLES

Example 1: Get a list of backup targets

PS C:\> $Policy = Get-WBPolicy
PS C:\> Get-WBBackupTarget -Policy $Policy

This example gets a list of the storage backup locations from a backup policy.

The first command gets the current backup policy and stores it in a variable named $Policy.

The second command gets the list of storage backup locations from the WBPolicy object that is stored in the $Policy variable.

PARAMETERS

-Policy

Specifies a backup policy object for which this cmdlet displays information.

Type: WBPolicy
Parameter Sets: (All)
Aliases: InPolicy

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

WBPolicy

This cmdlet queries the backup policy contained in the specified WBPolicy object.

OUTPUTS

WBBackupTarget []

This cmdlet returns a list of the storage locations that the backup policy object contains.

NOTES

Add-WBBackupTarget

Get-WBDisk

Get-WBPolicy

New-WBBackupTarget

Remove-WBBackupTarget

© 2017 Microsoft