Hi - I need to create a csv that lists the members from multiple AD groups and for each member shows their displayname, username, distinquished name etc
So far I've got a script that lists members for each group:
$Groups = Get-ADGroup -Properties * -Filter * -SearchBase <path to OU>
Foreach($G In $Groups)
{
Write-Host $G.Name
Write-Host "-------------"
$G.Members
}
But how do I modify this to display the properties for each user and also output to a csv?
Any help much appreciated
J