Compartilhar via


Get-WBPolicy

Get-WBPolicy

Retrieves the current backup policy for the computer.

Syntax

Parameter Set: Default
Get-WBPolicy [-Editable] [ <CommonParameters>]

Detailed Description

The Get-WBPolicy cmdlet retrieves the backup policy object for the computer. Use the Editable parameter to return the policy information in edit mode.

To use this or any other Windows Server 2012 Backup cmdlets, you must be a member of the Administrators group or Backup Operators group.

Parameters

-Editable

Indicates that the cmdlet returns a current backup policy in edit mode.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Editable

    This cmdlet uses the Editable parameter to set the WBPolicy object in edit mode.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • WBPolicy

    This cmdlet displays the WBPolicy object. The cmdlet returns a null value if no backup policy is set.

Notes

  • If you use the Editable parameter to make changes, set the updated policy as the current policy by using the Set-WBPolicy cmdlet.

Examples

Example 1: Get a current backup policy

This command gets information about the backup policy object. The information includes all the settings for the backup policy, such as what items to back up, when to run backups, and where to store backups.

PS C:\> Get-WBPolicy

Example 2: Get a current backup policy in edit mode

This command gets information about the backup policy object, and it makes the policy editable.

PS C:\> Get-WBPolicy -Editable

New-WBPolicy

Remove-WBPolicy

Set-WBPolicy