script check the AD accounts without login 90 days and disable it only
dear all
how create script check ad user accounts (windows 2008) without login 90 days , disable it.
regards
pk
something should work (actually, it's better use lastlogontimestamp, not lastlogon):
search-adaccount -usersonly -accountinactive -timespan "90"
after can either export them csv file or delete them straight away. remember created users issue.
if looking more advanced solution, have got experience adaxes. here example of how achieve want it: http://www.adaxes.com/tutorials_automatingdailytasks_automaticallydeprovisioninactiveactivedirectoryusers.htm
Windows Server > Directory Services
Comments
Post a Comment