When I run this Powershell command line:
Get-ADGroupMember "All Supervisors" -server east.ad.company.com
it produces the error:
....FullyQualifiedErrorId : Cannot find an object with identity: 'All Supervisors' under: 'DC=east,DC=ad,DC=company,DC=com'.,Microsoft.ActiveDirectory.Management.Commands.GetADGroupMember...
I don't have any issues when using ADUC (Active Directory User and Computers) to do the same thing. I just type:All Supervisors in the Name field; and, change the scope to look in:
east.ad.company.com. ADUC finds the group within a few seconds. Or, I can search theEntire Directory; which works every time.
I'm not sure what I'm missing. I tried searching the Internet for this specific issue; but didn't find anything that helps.
--------------------------------------------------------------------------------------------------------
A couple of things to note:
- I can successfully use: get-aduser -identity ADUserID -server west.ad.company.com (where user is in a different domain as me)
- I can successfully use: Get-AdGroupMember (as long as the group is in the same domain as me)
--------------------------------------------------------------------------------------------------------
Lastly and very importantly: I almost always set the search scope for ADUC to:Entire Directory when searching for groups and users; since I don't usually know what domain they're in. I was hoping someone could show me the simplest possible script that can do the equivalent of what I do in ADUC when searching theEntire Directory for both groups and users.