Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #create a log file
- Start-Transcript "c:\AzureADELogging.txt" -Append
- #Find out if 'Soft Delete’ is Enabled for all KeyVaults in all subscriptions.
- Get-AzKeyVault -VaultName "kyvazewdzzzz001diskcrypt”
- #Enabling ‘Soft Delete’ on an existing Key Vault
- ($resource = Get-AzResource -ResourceId (Get-AzKeyVault -VaultName " kyvazewdzzzz001diskcrypt").ResourceId).Properties | Add-Member -MemberType "NoteProperty" -Name "EnableSoftDelete" -Value "true"
- #then run the below
- Set-AzResource -resourceid $resource.ResourceId -Properties $resource.Properties
- #Run the Get-AzKeyVault command again to check that the Soft Delete feature has been enabled
- Get-AzKeyVault -VaultName "kyvazewdzzzz001diskcrypt”
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement