SMTP Port 25

Anything and Everything Related to Messaging and Collaboration, Active Directory and Scripting. It’s My Life!!!

Posts Tagged ‘lastlogontime’

Powershell to get the list of user who last logon time is older then 30 days

Posted by Krishna - MVP on May 26, 2009

Below is the powershell command to get the list of mailbox who last log time is older then 30 days. This would be very help ful when you wanted to try to clean up exchagne server from unused account.  You can change from 30 to 6o or 90 days based on the requirement.

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

Posted in Exchange 2007, Powershell | Tagged: , , , , , , | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 52 other followers