I'm trying to get members list inside ADGroup but get-adgroupmember doesn't return "contacts".
Found that below script seems to be working for a single ADgroup
$GroupName = "group name"
$memberof=get-adgroup $GroupName |select -expandproperty distinguishedname
Get-ADObject -Filter 'memberof -eq $memberof ' -properties * | select name,mail,objectclass
Can anyone help me out get the same output for bulk ADGroups.