Skip to content

Instantly share code, notes, and snippets.

@joshfinley
Created February 14, 2024 20:46
Show Gist options
  • Save joshfinley/7ce02bfdb9e8e7c424ef5b59e96778b9 to your computer and use it in GitHub Desktop.
Save joshfinley/7ce02bfdb9e8e7c424ef5b59e96778b9 to your computer and use it in GitHub Desktop.
param(
[string]$filePath
)
Import-Module ActiveDirectory
Get-Content $filePath | ForEach-Object {
$groupName = $_
Write-Host "`nGroup-Name $groupName"
Write-Host "----------------"
Get-ADGroupMember -Identity $groupName | ForEach-Object {
Write-Host "$($_.Name) $($_.objectGUID)"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment