Hi Everyone,
Looking for a script to export list of AD users who are member of “Group A” but not member of “Group B”. Could you please assist ?
Thanks
Rajesh
Hi Everyone,
Looking for a script to export list of AD users who are member of “Group A” but not member of “Group B”. Could you please assist ?
Thanks
Rajesh
Yes, you will have to use Get-ADUser with Where-Object cmdlet. You can follow below docs to understand more about those cmdlets.
Get-ADUser: Get-ADUser (ActiveDirectory) | Microsoft Docs
Where-Object: Where-Object (Microsoft.PowerShell.Core) - PowerShell | Microsoft Docs
Let us know when you get stuck…