How to start using Azure PowerShell in Docker

docker pull mcr.microsoft.com/azure-powershell
docker run -it -v ~/.Azure/AzureRmContext.json:/root/.Azure/AzureRmContext.json -v ~/.Azure/TokenCache.dat:/root/.Azure/TokenCache.dat mcr.microsoft.com/azure-powershell pwsh
New-AzResourceGroup -Name storage-rg -Location westeurope
New-AzStorageAccount -ResourceGroupName storage-rg -Name stsysx001 -Location westeurope -SkuName Standard_RAGRS -Kind StorageV2
Remove-AzStorageAccount -Name stsysx001 -ResourceGroupName storage-rg Remove-AzResourceGroup -Name storage-rg

--

--

Maytham is a passionate software developer with more than ten years of experience. His motivation is to help transform ideas into production ready systems.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store