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