Created
April 9, 2021 13:49
-
-
Save Torxsmind/8e845fc2052339aaecd3e21b3449f3ee to your computer and use it in GitHub Desktop.
Get all active directory users properties
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
| $now = Get-Date -UFormat "%Y-%m-%d_%H-%M-%S" | |
| $filepath = 'C:\temp\Service_Accounts_' + $now + '.csv' | |
| Get-ADUser -Filter * -Searchbase "DC=domain,DC=com" -Properties * | Export-CSV -append -NoTypeInformation $filepath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment