Powershell Export a list of users in Active Directory and Status of the Account

06. February 2018 Poweshell 0


Little bit of PowerShell that I have thrown together in order to list all of the users within Active Directory, containing the following information

  • Name of the AD account
  • If the Account is Enabled
  • The Organisational Unit  the account is contained within

In order to establish the script I first ran a ‘Get’ Command to see all the options available, I picked the above aspects as this was all I needed at the time



then deciding what I wanted to include. The script was as follows


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.