Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions Links


SQL Server DBA Jobs

Use Get-ADPrincipalGroupMembership with other Active Directory domains

06 July,2020 by Tom Collins

Question: I use the Powershell cmdlet Get-ADPrincipalGroupMembership to get AD group membership of IDs within the current domain, but how can I use Get-ADPrincipalGroupMembership  to check the membership of an ID in another domain?


Answer: Yes , The Get-ADPrincipalGroupMembership cmdlet will return the group membership of the specified user , in the current domain  of the logon executing this cmdlet . To access the group membership of a specific ID , you'll need to use the -server switch . 


Get-ADPrincipalGroupMembership 'ID1' -Server 'anotherdoamin' | select name


If you want to read on how to access the group membership of an ID in the current domain - How to get the Active Directory groups membership for user with Powershell

Read more on Powershell and Active Directory 

How to Export Active Directory Group Members with Powershell Get-ADGroupMember 

Powershell Active Directory search

Author: Tom Collins (


Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment on Use Get-ADPrincipalGroupMembership with other Active Directory domains | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer