How Long Has User XYZ Been Logged In

And when was the last time they logged into their Exchange mailbox? Very important questions on the Microsoft side of the house.

Currently have an Exchange 2010 server on-prem (soon O365) and several aged accounts that needed to be disabled.

On a Windows machine open a command prompt and type quser.exe. This will show you all of the users currently logged in as well as when they logged in, and any idle time. Especially helpful on the Terminal Services hosts/RDS machines.
USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME
>BSDMAN console 1 Active none 9/8/2017 7:31 AM
>ADMIN rdp-tcp#0 2 Active none 9/11/2017 11:52 AM

How about for Mailbox exchange users?
Open the Exchange Management PowerShell
get-mailboxstatistics -server YOUREXSERVERNAME | sort LastLogonTime -Decending
To save it to a file just add the > c:\temp\ex_last_logon.txt to the end.

Profit.

Leave a Reply

Your email address will not be published. Required fields are marked *