Thursday, June 30, 2011

Exporting Disabled Users Account from AD

Run the following command from the CLI:


dsquery user -disabled -limit 0 -o rdn > c:\ FileName.txt


 Note: use limit option when the default limit of 100 is reached
Use -o rdn for format type

To find all user accounts that have been inactive for at least the last week or longer, you'd use the command:

dsquery user -inactive 1 -o rdn

No comments:

Post a Comment