Skip to content

Instantly share code, notes, and snippets.

@clr2of8
Forked from joswr1ght/groupenumeration.ps1
Created January 8, 2020 14:59
Show Gist options
  • Save clr2of8/996001a2f7e488df26db3702781af95c to your computer and use it in GitHub Desktop.
Save clr2of8/996001a2f7e488df26db3702781af95c to your computer and use it in GitHub Desktop.
Create a Collection of Files for Windows Domain Groups with User Members in Each File
Get-AdGroup -Filter * | % { Get-AdGroupMember $_.Name | Select-Object -ExpandProperty SamAccountName | Out-File -FilePath "$($_.Name).txt" -Encoding ASCII }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment