Get-OBRetentionPolicy
Gets the current retention policy for backups from the backup policy (OBPolicy object).
Syntax
Get-OBRetentionPolicy
[-Policy] <CBPolicy>
Description
The Get-OBRetentionPolicy cmdlet gets the current retention policy for backups from the backup policy (OBPolicy object).
The retention policy allows the number of retention days to be set to one of the following values: 7
, 15
, 30
.
To use Microsoft Azure Backup cmdlets, the user needs to be an administrator on the protected machine.
Examples
EXAMPLE 1
Get-OBPolicy | Get-OBRetentionPolicy
This example returns a saved retention policy.
Parameters
-Policy
Specify the OBPolicy object for which the OBRetentionPolicy should be retrieved.
Type: | CBPolicy |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
None
Outputs
Microsoft.Internal.CloudBackup.Commands.OBPolicy