Get-ADPrincipalGroupMembership bug when trying to use -Server and -Credential?

Viewed 440

I'm curious if anybody else can duplicate an issue I'm having.

Some background:

We have 4 Domains on the same network and our server can talk to all 4 Domains. Let's call then D1, D2, D3 & D4. The Server I'm using is bound to D1.

Trusts are as follows: D2 Trusts D1. D4 Trusts D3. That's it.

From my Server, I'm trying to use the "Get-ADPrincipalGroupMembership" to get the groups a user is a member of, by using the -Server and -Credential switches, IF the call is to the D3 or D4 Domains. The Credentials I'm supplying are valid D3 Domain credentials.

I should add, that this works for several other Commandlets, such as "Get-ADUser", "Get-ADGroup", "Get-ADGroupMemeber". The only time I have an issue is when trying to use the "Get-ADPrincipalGroupMembership" command.

So this does not work:

$AccountGroups = Get-ADPrincipalGroupMembership -Identity $SvcAccountName -Server $Server -Credential $Creds | Select Name

The error message I get is as follows: "The operation being requested was not performed because the user has not been authenticated".

Changing my code as follows, using the same variables, works:

$AccountGroups = GET-ADUSER –Identity adm-e43383 –Properties MemberOf -Server $Server -Credential $Creds | Select-Object MemberOf).MemberOf | Get-ADGroup -Server $Server -Credential $Creds| Select Name

Has anybody seen this before or can you replicate the issue?

0 Answers
Related