Created
January 31, 2020 13:29
-
-
Save alanta/6f4fa5dbdd25372a16ba6915282d004f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ([Parameter(Mandatory)]$keyvaultname) | |
$userid = az ad signed-in-user show --query objectId | |
if($LASTEXITCODE){ | |
Write-Information "Please login using 'az login' and make sure you select the correct subscription with 'az account'" | |
} | |
az keyvault set-policy -n $keyvaultname --secret-permissions backup delete get list purge recover restore set --object-id $userid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment