Welcome › Forums › General PowerShell Q&A › Query on Group membership
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 ?
Yes, you will have to use Get-ADUser with Where-Object cmdlet. You can follow below docs to understand more about those cmdlets.
Let us know when you get stuck...