Use PowerShell to check if a user is a member of an Active Directory Group

Problem:

How do I use PowerShell to check if a user is a member of an Active Directory Group?

Solution:

Get-aduser someuser -properties * | select -expand memberof | where { $_ -like *AGroup* } 

Leave a Reply

Your email address will not be published. Required fields are marked *