How to login to Azure via PowerShell

– Either Add-AzureAccount (You can add as many accounts)

– or Get-AzurePublishSettingsFile

Import-AzurePublishSettingsFile C:\Users\GS\Spark-11-5-2015credentials.publishsettings

Run following cmdlet to check if you are connected successfully:

Get-AzureAccount / Get-AzureSubscription

To remove an account: Remove-AzureAccount -Name abc@xyz.com

https://www.tutorialspoint.com/microsoft_azure/microsoft_azure_powershell.htm

Leave a comment