How to use connect-azaccount in PowerShell?

If you’re using PowerShell to access Azure, just run Connect-AzAccount and a login window will pop up where you sign in with your Azure account; once logged in, your session is authenticated and you can start running Azure commands, and if you have multiple subscriptions you can switch using Set-AzContext—pretty straightforward, I usually just run it at the start of every session and it works fine.
 
Install Az module, import it, then run Connect-AzAccount. A browser opens for login. After authentication, manage Azure resources. Optionally specify tenant or subscription using parameters for targeted access and context.
 
Yeah it’s pretty simple, just install the Az module first, then run Connect-AzAccount and it’ll pop open a login window for your Azure account, once you sign in you’re good to go
 
Back
Top