How to list all AD users and display account status Enabled / Disable on 1 list?

Our auditors are asking for a list of AD users listed on a single printout along with their current account status - Enabled or Disable.  We have our current users created in their respective dept OU's.  How can I get all of them on one listing?
helpdesk_wlkAsked:
Who is Participating?
 
Joseph DalyCommented:
Use the following at a command prompt.
dsquery user -samid * | dsget user -samid -ln -fn -disabled

The -disabled command displays the status of the accounts. A value yes returned establishes that the account is disabled (for logon); a value of no establishes that the account is enabled (for logon)

You can then pipe this to anything.txt
0
 
Brian PiercePhotographerCommented:
0
 
kg69Commented:
Load Powershell, Then get and install Quest's ActiveRoles for Management Shell For Active Directory.
Then run Powershell and type the following command.

#For a list of enabled users
get-qaduser -Sizelimit 0 -Enabled

#For a list of Disabled Users
get-qaduser -Sizelimit 0 -Disabled
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
kg69Commented:
You may also export this to a csv using:

get-qaduser -Sizelimit 0 -Enabled | Export-Csv -path mycsv.csv

0
 
helpdesk_wlkAuthor Commented:
Who whoooo!  That's what I'm talkin about...   Fast, easy, no cost and I got the report to the auditors on time!  You are da man!
0
 
Joseph DalyCommented:
one other thing you may need to do is add the -limit 0 switch if you have more than 100 users.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.