Created
August 17, 2018 12:14
-
-
Save seriald/8cc7df7053ca5cf61d9465b4885cc9af to your computer and use it in GitHub Desktop.
Export a list of users within an AD Group
This file contains 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
$ad = Read-Host -Prompt 'Enter the AD Group' | |
$path = pwd | |
Clear-Content -Path "$path\Export\*" | |
$file = "$path\export\$ad.txt" | |
Get-ADGroupMember -Identity $ad | Out-File -FilePath $file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment