Get-AzureADCurrentSessionInfo

In this Azure PowerShell article, we will discuss the syntax and usage of the Get-AzureADCurrentSessionInfo PowerShell cmdlet with an example of how to use this command.

Get-AzureADCurrentSessionInfo

This a very good PowerShell cmdlet that can help you to get the state of the current session.

Syntax

Below is the syntax of the Get-AzureADCurrentSessionInfo PowerShell command.

Get-AzureADCurrentSessionInfo

Let us discuss an example of how to use the Get-AzureADCurrentSessionInfo PowerShell command.

Example

You can execute the below PowerShell command to get the details of the state of the current session.

Connect-AzureAD
Get-AzureADCurrentSessionInfo

After executing the above PowerShell command, I got the below-expected output.

PS C:\WINDOWS\system32> Connect-AzureAD
Get-AzureADCurrentSessionInfo

Account                   Environment TenantId                             TenantDomai
                                                                           n          
-------                   ----------- --------                             -----------
fewlines4biju@hotmail.com AzureCloud  f8cdef31-a31e-4b4a-93e4-5f571e91255a            
fewlines4biju@hotmail.com AzureCloud  f8cdef31-a31e-4b4a-93e4-5f571e91255a

You can see the same output below.

Get-AzureADCurrentSessionInfo

Note that, You must call the Connect-AzureAD cmdlet before calling the Get-AzureADCurrentSessionInfo PowerShell command.

Check out the below Video tutorial on the Get-AzureADCurrentSessionInfo PowerShell Command.

Final Thoughts

In this Azure PowerShell article, we discussed the syntax and usage of the Get-AzureADCurrentSessionInfo PowerShell command. Thanks for reading this article !!!