@@ -76,7 +76,7 @@ Note that although specifying the resource group is optional for this cmdlet, yo
76
76
### Example 1: Grant permissions to a user for a key vault Key Vault and modify the permissionskey vault
77
77
```
78
78
PS C:\>Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName '[email protected] ' -PermissionsToKeys create,import,delete,list -PermissionsToSecrets 'set,delete'
79
- PS C:\> Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName '[email protected] ' -PermissionsToSecrets ' set,delete,get' -PassThru
79
+ PS C:\> Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName '[email protected] ' -PermissionsToSecrets set,delete,get -PassThru
80
80
PS C:\> Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName '[email protected] ' -PermissionsToKeys @() -PassThru
81
81
```
82
82
@@ -92,7 +92,7 @@ The *PassThru* parameter results in the updated object being returned by the cmd
92
92
93
93
### Example 2: Grant permissions for an application service principal to read and write secrets
94
94
```
95
- PS C:\>Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -ServicePrincipalName 'http://payroll.contoso.com' -PermissionsToSecrets ' Get,Set'
95
+ PS C:\>Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -ServicePrincipalName 'http://payroll.contoso.com' -PermissionsToSecrets Get,Set
96
96
```
97
97
98
98
This command grants permissions for an application for a key vault named Contoso03Vault.
@@ -103,15 +103,15 @@ This example specifies the service principal name http://payroll.contoso.com, an
103
103
104
104
### Example 3: Grant permissions for an application using its object ID
105
105
```
106
- PS C:\>Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -ObjectId 34595082-9346-41b6-8d6b-295a2808b8db -PermissionsToSecrets ' Get,Set'
106
+ PS C:\>Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -ObjectId 34595082-9346-41b6-8d6b-295a2808b8db -PermissionsToSecrets Get,Set
107
107
```
108
108
109
109
This command grants the application permissions to read and write secrets.
110
110
This example specifies the application using the object ID of the service principal of the application.
111
111
112
112
### Example 4: Grant permissions for a user principal name
113
113
```
114
- PS C:\>Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName '[email protected] ' -PermissionsToSecrets ' Get,List,Set'
114
+ PS C:\>Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName '[email protected] ' -PermissionsToSecrets Get,List,Set
115
115
```
116
116
117
117
This command grants get, list, and set permissions for the specified user principal name for access to secrets.
0 commit comments