In this task, you will add a key to the Key Vault and view information about the key.
In the Azure portal, open a PowerShell session in the Cloud Shell pane.
Ensure PowerShell is selected in the upper-left drop-down menu of the Cloud Shell pane.
In the PowerShell session within the Cloud Shell pane, run the following to add a software-protected key to the Key Vault:
$kv = Get-AzKeyVault -ResourceGroupName 'AZ500LAB10'
$key = Add-AZKeyVaultKey -VaultName $kv.VaultName -Name 'MyLabKey' -Destination 'Software'
Note: The name of the key is MyLabKey
In the PowerShell session within the Cloud Shell pane, run the following to verify the key was created:
Get-AZKeyVaultKey -VaultName $kv.VaultName
In the PowerShell session within the Cloud Shell pane, run the following to display the key identifier:
$key.key.kid
Minimize the Cloud Shell pane.
Back in the Azure portal, on the Key Vault blade, in the Settings section, click Keys.
In the list of keys, click the MyLabKey entry and then, on the MyLabKey blade, click the entry representing the current version of the key.
Note: Examine the information about the key you created.
Note: You can reference any key by using the key identifier. To get the most current version, reference
https://<key_vault_name>.vault.azure.net/keys/MyLabKeyor get the specific version with:https://<key_vault_name>.vault.azure.net/keys/MyLabKey/<key_version>