Get-OBPolicyState
Get-OBPolicyState
Gets the PolicyState of the current backup policy. The state can be either Valid or Paused.
Syntax
Parameter Set: Default
Get-OBPolicyState [-Policy] <CBPolicy> [ <CommonParameters>]
Detailed 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.
Parameters
-Policy<CBPolicy>
Specifies the backup policy (OBPolicy) object from which to get the PolicyState.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
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.
- Microsoft.Internal.CloudBackup.Commands.OBPolicy
Outputs
The output type is the type of the objects that the cmdlet emits.
- Microsoft.Internal.CloudBackup.Commands.OBPolicyState
Examples
EXAMPLE 1
This example shows how to get the current state of the backup policy.
PS C:\> $P = Get-OBPolicy
PS C:\> Get-OBPolicyState $P