Set-OBPolicyState
Sets the PolicyState of the current backup policy object. The state can be either Valid or Paused.
Set-OBPolicyState
[-Policy] <CBPolicy>
[-State] <OMPolicyStates>
[-Confirm]
[-WhatIf]
This cmdlet can be used to set 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.
$P = Get-OBPolicy
Set-OBPolicyState $P "Valid"
Set-OBPolicy $P
This example sets the OBPolicyState to Valid and updates the OBPolicy object.
$P = Get-OBPolicy
Set-OBPolicyState $P "Paused"
Set-OBPolicy $P
This example sets the OBPolicyState to Paused and updates the OBPolicy object.
Get-OBPolicy | Set-OBPolicyState -State "Paused" | Set-OBPolicy
This example sets the OBPolicyState to Paused and updates the OBPolicy object using pipelines.
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the backup policy (OBPolicy) object on which to set the PolicyState.
Type: | CBPolicy |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
The current PolicyState of the backup policy.
Type: | OMPolicyStates |
Position: | 3 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Microsoft.Internal.CloudBackup.Commands.OBPolicy
Microsoft.Internal.CloudBackup.Commands.OBPolicyState