Last active
August 22, 2017 09:18
-
-
Save varnav/0666ed5a099d7da447f3e85d4653e7eb to your computer and use it in GitHub Desktop.
Export Active Directory users to simple txt file, one user per line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get-ADUser -SearchBase "DC=domain,DC=local" -Filter {(mail -ne "null") -and (Enabled -eq "true")} | Format-Table -HideTableHeaders SamAccountName | Out-File d:\aduserlist.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment