Share via


Get-WBPolicy

Get-WBPolicy

Gets the current backup policy that is set for the computer.

Syntax

Get-WBPolicy [-Editable] [<CommonParameters>]

Detailed Description

The Get-WBPolicy cmdlet gets the current backup policy that is set for the computer. If you specify the -Editable parameter, the policy information is returned in edit mode so that it can be changed.

Parameters

-Editable <SwitchParameter>

Specifies that the current backup policy be returned in edit mode.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-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 use the -Editable parameter, once you are done making changes, you should set the updated policy as the current one again by using Set-WBPolicy.

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

Examples

EXAMPLE 1

C:\PS>$policy = Get-WBPolicy

The currently set policy of the system in a read-only mode.

Description

-----------

Gets information about the currently set backup policy. The information includes all the settings for the backup (what will be backed up, when backups will be run, and where they will be stored).

EXAMPLE 2

C:\PS>$policy = Get-WBPolicy -Editable

The currently set policy of the system in an editable mode.

Description

-----------

Gets information about the currently set backup policy, and also makes the policy editable.

See Also

Reference

Set-WBPolicy