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

rated by 0 users
This post has 0 Replies | 1 Follower

Top 10 Contributor
Posts 211
Top Contributor
Krishna Posted: 06-01-2009 8:33 AM

http://smtpport25.wordpress.com/2009/05/26/powershell-to-get-the-list-of-user-who-last-logon-time-is-older-then-30-days/

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

Page 1 of 1 (1 items) | RSS
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.