Install Azure Powershell on Linux
First use the following commands to setup the Microsoft repo and install Powershell from it:
- rhel8
- rhel7
- ubuntu2004
- ubuntu1804
1 |
|
Then install the Azure Powershell module from Powershell using the command below:
PS > Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force
Alternatively if you have docker installed, you can run a container with Azure Powershell directly
docker run -it mcr.microsoft.com/azure-powershell pwsh
Authenticate using Connect-AzAccount -UseDeviceAuthentication
, then you should be able to run any commands such as Get-AzVM
!
Et voila !