Powershell to list of users who last log in older then 30 days

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

Top 10 Contributor
Posts 211
Top Contributor
Krishna Posted: 09-12-2009 12:13 PM

Some times we may wanted to get list of users last logon time. This command helps you the get list of all the users who lastlogontimestamp is older then 30 days or 60 days

Get-QADUser -sizeLimit 0 | where {$_.lastlogontimestamp -lt (get-date).AddDays(-30)} | Select NAme,lastlogontimestamp

Get-QADUser -sizeLimit 0 | where {$_.lastlogontimestamp -lt (get-date).AddDays(-60)} | Select NAme,lastlogontimestamp

Regards,
Krishna
http://smtpport25.wordpress.com

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.