Created
June 11, 2015 17:11
-
-
Save pkirch/72283a0726950c3f7e91 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
Select-AzureSubscription "MSFT MVA Live" | |
Switch-AzureMode AzureResourceManager | |
New-AzureResourceGroup –Name mvasqlsvr –Location "West Europe" | |
New-AzureKeyVault -VaultName mvasqlsvr -ResourceGroupName mvasqlsvr -Location "West Europe" -SKU Premium | |
$key1 = Add-AzureKeyVaultKey -VaultName mvasqlsvr -Name testkey1 -Destination Software | |
$securepfxpwd = ConvertTo-SecureString -String "Azureisttoll!" -AsPlainText -Force | |
$key2 = Add-AzureKeyVaultKey -VaultName mvasqlsvr -Name sqlmasterkey -KeyFilePath C:\Users\pkirch\Desktop\KeyVaultImportTest.pfx -KeyFilePassword $securepfxpwd -Destination HSM | |
Set-AzureKeyVaultAccessPolicy -VaultName mvasqlsvr -ServicePrincipalName XYZ1 -PermissionsToKeys get,list,wrapKey,unwrapKey,create | |
Set-AzureKeyVaultAccessPolicy -VaultName mvasqlsvr -ServicePrincipalName XYZ2 -PermissionsToKeys get,list,wrapKey,unwrapKey |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment