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

Popular posts from this blog

server manager error: ADAM.events.xml could not be enumerated.

Cannot access Anywhere Access using domain name?

WMI Failure: Unable to update Local Resource Group