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
--------------------------
get-adgroupmember -identity administrators |ft distinguishedName |out-string -width 200
--------------------------
?