Get-OBPolicyState

Gets the PolicyState of the current backup policy. The state can be either Valid or Paused.

Syntax

Get-OBPolicyState
   [-Policy] <CBPolicy>

Description

This cmdlet can be used to get the current state of the backup policy. The state can be either Valid or Paused.

A Valid state means that the backups will happen based on the defined schedule and that backups will be retained based on the retention policy.

A Paused state means that backups will not occur according to the defined schedule that the current backups will be retained until the backup policy is changed to Valid state or is deleted.

Examples

EXAMPLE 1

$P = Get-OBPolicy
 Get-OBPolicyState   $P

This example shows how to get the current state of the backup policy.

Parameters

-Policy

Specifies the backup policy (OBPolicy) object from which to get the PolicyState.

Type:CBPolicy
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

Microsoft.Internal.CloudBackup.Commands.OBPolicy

Outputs

Microsoft.Internal.CloudBackup.Commands.OBPolicyState