Hi @Ron dorel ,
maybe this helps to get started (not tested).
CSV file content:
groupname,servername
group1,v1.contoso.com
group2,v1.contoso.com
group3,v2.contoso.com
group4,v2.contoso.com
Script:
Import-Csv -Path "Junk\GroupsAndServers.csv" | ForEach-Object {
get-adgroupmember $_.groupname -Server $_.servername
}
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten