Created
February 14, 2024 20:46
-
-
Save joshfinley/7ce02bfdb9e8e7c424ef5b59e96778b9 to your computer and use it in GitHub Desktop.
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
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