< Back

Enable-AzureStorageDeleteRetentionPolicy

Tue Jan 29, 2019 9:26 pm

NAME Enable-AzureStorageDeleteRetentionPolicy



SYNOPSIS

Enable delete retention policy for the Azure Storage Blob service.





SYNTAX

Enable-AzureStorageDeleteRetentionPolicy [-RetentionDays] <Int32> [-Context <IStorageContext>] [-PassThru] [-Confirm] [-WhatIf]

[<CommonParameters>]





DESCRIPTION

The Enable-AzureStorageDeleteRetentionPolicy cmdlet enables delete retention policy for the Azure Storage Blob service.





PARAMETERS

-Context <IStorageContext>

Azure Storage Context Object



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-PassThru [<SwitchParameter>]

Display DeleteRetentionPolicyProperties



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-RetentionDays <Int32>

Sets the number of retention days for the DeleteRetentionPolicy.



Required? true

Position? 0

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Microsoft.Azure.Commands.Common.Authentication.Abstractions.IStorageContext







OUTPUTS

Microsoft.WindowsAzure.Storage.Shared.Protocol.DeleteRetentionPolicyProperties







NOTES









Example 1: Enable delete retention policy for the Blob service



C:\\PS>Enable-AzureStorageDeleteRetentionPolicy -RetentionDays 3



This command enables delete retention policy for the Blob service, and set deleted blob retention days to 3.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... tionpolicy