- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to check which Azure account is logged in using PowerShell?
To check the logged-in Azure user account in the console using PowerShell, you can check the context of the Azure and for that Get-AZContext command is used.
Example
Get-AzContext
Output
If you are already logged in with multiple user accounts then there may be chances that there are multiple contexts available, to list all the available context, use the below command,
Example
Get-AzContext -ListAvailable
Output
You can choose the context using the Select-AZContext command.
- Related Articles
- How to get the currently logged-in user account with Azure CLI in PowerShell?
- How to connect Azure Account using PowerShell?
- How to get the Azure VM storage account type using PowerShell?
- How to log in to the Azure account using Az CLI command in PowerShell?
- How to check Azure VM Power state using PowerShell?
- How to check if the Azure resource group is empty or not using PowerShell?
- How to list the Azure VMs using Azure CLI in PowerShell?
- How to deallocate the Azure VM using Azure CLI in PowerShell?
- How to start the Azure VM using Azure CLI in PowerShell?
- How to stop the Azure VM using Azure CLI in PowerShell?
- How to restart the Azure VM using Azure CLI in PowerShell?
- How to resize the Azure VM using Azure CLI in PowerShell?
- How to connect to the Azure subscription using Azure CLI in PowerShell?
- How to retrieve Azure VMs using PowerShell?
- How to get the Azure resource group using Azure CLI in PowerShell?

Advertisements