Link to home
Start Free TrialLog in
Avatar of CGNET-TE
CGNET-TE

asked on

get-adgroupmember for builtin\administrator fail

Hi I was running this task for obtaining the member of Builtin\Administrator group and it was working ok

get-adgroupmember "CN=Administrators,CN=Builtin,DC=CenterXXX,DC=ORG" |ft distinguishedName |out-string -width 200 >C:\cgxxxt1-scripts\Reports\admins.txt

 but I noticed today that it stopped to work and when I run it from the PowerShell the error below is displayed. Any idea about this error? I tried using -identity parameter and it is the same error. Only this is for administrator is failing. I have other task using the same command for Domain Admin and it working ok.  Ideas?

Thanks,
Libe
 

PS C:\Users\admin> get-adgroupmember "CN=Administrators,CN=Builtin,DC=Centerxxx,DC=ORG" |ft distinguishedName |out-str
ing -width 200
Get-ADGroupMember : A referral was returned from the server
At line:1 char:18
+ get-adgroupmember <<<<  "CN=Administrators,CN=Builtin,DC=Centerxxx , DC=ORG" |ft distinguishedName |out-string -width 200

    + CategoryInfo          : NotSpecified: (CN=Administrato...=CEnterxx,DC=ORG:ADGroup) [Get-ADGroupMember], ADExcepti
   on
    + FullyQualifiedErrorId : A referral was returned from the server,Microsoft.ActiveDirectory.Management.Commands.Ge
   tADGroupMember

PS C:\Users\admin
Avatar of bvwbzb
bvwbzb

could you not perhaps use the ps command like this:
------------------------------
get-adgroupmember -identity administrators |ft distinguishedName |out-string -width 200
--------------------------------

?
Avatar of CGNET-TE

ASKER

Hi
I already tried this bellow too but error is the same.  Any idea?

get-adgroupmember -identity administrators |ft distinguishedName |out-string -width 200

PS C:\Users\rootadmin> get-adgroupmember -identity administrators |ft distinguishedName |out-string -width 200
get-adgroupmember : A referral was returned from the server
At line:1 char:1
+ get-adgroupmember -identity administrators |ft distinguishedName |out-string -wi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (administrators:ADGroup) [Get-ADGroupMember], ADException
    + FullyQualifiedErrorId : A referral was returned from the server,Microsoft.ActiveDirectory.Management.Commands.Ge
   tADGroupMember

PS C:\Users\rootadmin>
ASKER CERTIFIED SOLUTION
Avatar of bvwbzb
bvwbzb

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial