Please ensure you have Azure CLI for Windows PowerShell installed. If you have already installed it then skip to the "Azure Login" section.
You can install the Azure CLI using PowerShell. Start PowerShell as administrator. Your command prompt should look like C:\Windows\system32
. Run the following command:
Example Request:
Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi
Example Response:
PS C:\Windows\system32> Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi
NOTE: Ensure that you are NOT running PowerShell as admin for the rest of the deployment.
You should be running PowerShell from your user account. The command prompt should have your username listedC:\Users\dcts0859>
.
If you already have Azure CLI installed please run the in-tool command to update to the latest version.
Example Request:
az upgrade
Example Response:
PS C:\Users\dcts0859> az upgrade
This command is experimental and not covered by customer support. Please use with discretion.
You already have the latest azure-cli version: 2.15.1
Upgrade finished.
To proceed with deployment you will need to login to your account at Azure.
Example Request:
az login
Example Response:
PS C:\Users\dcts0859> az login
The default web browser has been opened at https://login.microsoftonline.com/common/oauth2/authorize. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with `az login --use-device-code`.
You have logged in. Now let us find all the subscriptions to which you have access...
[
{
"cloudName": "AzureCloud",
"homeTenantId": "094a4238-798c-1234-1234-154123456789",
"id": "9ddaf2bb-fc50-1234-1234-459123456789",
"isDefault": true,
"managedByTenants": [],
"name": "Azure subscription 1",
"state": "Enabled",
"tenantId": "094a4238-798c-1234-1234-154123456789",
"user": {
"name": "dcts0859@distech.support",
"type": "user"
}
}
]
NOTE: Please record the
tenantId
in the response you receive from running the command above.
You will need this later to generate a bearer token and to complete the following steps. We will refer to this as the TenantID in this wiki.