Skip to content

Instantly share code, notes, and snippets.

@joswr1ght
joswr1ght / groupenumeration.ps1
Created January 8, 2020 13:08
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 }