Tuesday, March 19, 2024

Powershell: Get a list from all Exchange users, where the latest logon time is older then 270 days

You need a powershell command which will get a list of all Microsoft Exchange user, where the latest login time is older then 270 days.

This is quite simple to do via:

Get-MailboxStatistics -Server exchangesrv01 | where {$_.Lastlogontime -lt (get-date).AddDays(-270)} | Select displayName,LastLoggedOnUserAccount,LastLogonTime

Adjust the servername and the AddDays if needed, so that it fits your requirements

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay Connected

35FollowersFollow
- Advertisement -

Latest Articles