Get-OBRetentionPolicy
Gets the current retention policy for backups from the backup policy (OBPolicy object).
PowerShell
Get-OBRetentionPolicy
[-Policy] <CBPolicy>
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.
PowerShell
Get-OBPolicy | Get-OBRetentionPolicy
This example returns a saved retention 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 |
None
Microsoft.Internal.CloudBackup.Commands.OBPolicy