Powershell Get-ADGroupMember - NotSpecified: ADGroup [Get-ADGroupMember], ADException

If I use the command

Get-ADGroupMember -Identity AD Group

it works fine.
But for some existing groups I get an error message

NotSpecified: (xxx:ADGroup) [Get-ADGroupMember], ADException

What could be the reason? I can not find anything, the group does exist in the active directory and I can see all properties with the AD console. I have some additional AD groups where I also get this error message


Welcome to the forum. :wave:t4:

You don’t share enough information to be sure about what’s happening. Please share the complete code and the complete error message (both formatted as code please)

When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.

Thanks in advance

How to format code in PowerShell.org <---- Click :point_up_2:t4: :wink:

Sorry, but this is the complete code, it’s just the command

Get-ADGroupMember -Identity ecrh | select -ExpandProperty Name
NotSpecified: (ecrh:ADGroup) [Get-ADGroupMember], ADException

For the most of our AD groups this command works fine, but for some I get a error message.
But all groups exists in the AD and are working fine.

just to show you, I created a new AD group and it works fine:

Get-ADGroupMember -Identity ecrh-neu | select -ExpandProperty Name

I’ve never seen such an error message before. Sorry, I have no idea. Do you run this query on a server or from a client? Did you try it on another client? Did you try to use quotes for the group name?

I also never seen such an error message before. I run the command from my admin pc within our network. I did not tried other clients. Because for the most of the other groups it’s working fine, I think it’s not a problem of the client. I guess it’ts a problem of the AD group, but if I compare the properties with a group whichs works fine, I can not see any differerence.

Could this be relevant?

I find out now, if there is in the group a member from another domain within the forest the probleme ocure.
But in my case these members are still valid and active. I do not understand why poweshell can not find then the group.

Within the AD I can see and handle these members without problems.