Alex
asked on
Get contacts from distribution groups
Afternoon all,
I need to find any contacts in any distribution groups from AD. I know that Get-adgroupmember doesn't return contacts and I'm unsure as to the best way forward.
I know that'll pull the members within an object but it won't filter out only contacts. Any idea how to go about this? I've had a search and not found anything that filters contacts before the output.
Thanks
Alex
I need to find any contacts in any distribution groups from AD. I know that Get-adgroupmember doesn't return contacts and I'm unsure as to the best way forward.
Get-ADObject -Filter {(objectclass -eq 'group')} -Properties Member
I know that'll pull the members within an object but it won't filter out only contacts. Any idea how to go about this? I've had a search and not found anything that filters contacts before the output.
Thanks
Alex
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ACtually
oBdA, could you tell me how I can get it to reference the group that it's found the contact in??? I was wrong, we do have contacts in groups (it just came through)
I can then output it to a CSV
Thanks
Alex
oBdA, could you tell me how I can get it to reference the group that it's found the contact in??? I was wrong, we do have contacts in groups (it just came through)
I can then output it to a CSV
Thanks
Alex
EXPERT CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Makes sense now, I knew I needed to use the get-adobject but I couldn't figure out the best way, as always thank you for your help.
Thanks
Alex