Skip to content

Instantly share code, notes, and snippets.

@mleyb
Forked from JanneMattila/AddUserToKeyVault.ps1
Created October 15, 2016 08:38
Show Gist options
  • Save mleyb/819a61ee8aee4dcb3b3d2a274e933a60 to your computer and use it in GitHub Desktop.
Save mleyb/819a61ee8aee4dcb3b3d2a274e933a60 to your computer and use it in GitHub Desktop.
Add user to Key Vault
$me = Get-AzureRmADUser -SearchString "your name"
Set-AzureRmKeyVaultAccessPolicy `
-VaultName $VaultName `
-ResourceGroupName $ResourceGroupName `
-UserPrincipalName $me.UserPrincipalName `
-PermissionsToKeys all `
-PermissionsToSecrets all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment