title | description | services | documentationcenter | author | manager | editor | ms.service | ms.workload | ms.topic | ms.date | ms.author | ms.custom |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Azure PowerShell Script Sample - Add a user | Microsoft Docs |
Learn how to add a user in API Management and get a subscription key. See a sample script and view additional available resources. |
api-management |
dlepow |
cfowler |
api-management |
mobile |
sample |
11/16/2017 |
danlep |
mvc, devx-track-azurepowershell |
This sample script creates a user in API Management and gets a subscription key.
[!INCLUDE updated-for-az]
[!INCLUDE cloud-shell-try-it.md]
If you choose to install and use the PowerShell locally, this tutorial requires the Azure PowerShell module version 1.0 or later. Run Get-Module -ListAvailable Az
to find the version. If you need to upgrade, see Install Azure PowerShell module. If you are running PowerShell locally, you also need to run Connect-AzAccount
to create a connection with Azure.
[!code-powershellmain]
When no longer needed, you can use the Remove-AzResourceGroup command to remove the resource group and all related resources.
Remove-AzResourceGroup -Name myResourceGroup
For more information on the Azure PowerShell module, see Azure PowerShell documentation.
Additional Azure PowerShell samples for Azure API Management can be found in the PowerShell samples.