I'm trying to get a list of members (users/groups) within the Built-in Administrators group for the domain.
When I run the Get-QADGroup Administrators | Select Name
It returns an error:
Get-QADGroupMember : The trust relationship between the primary domain and the trusted domain failed.
At line:1 char:19
+ Get-QADGroupMember <<<< "Administrators" | Select Name
+ CategoryInfo : NotSpecified: (:) [Get-QADGroupMember], SystemException
+ FullyQualifiedErrorId : System.SystemException,Quest.ActiveRoles.ArsPowerShellSnapIn.Powershell.Cmdlets.GetGroup
I am able to successfully run the the following dsquery command, but returns the full CN path.
I would prefer to have the Get-QADGroupMember option working for consistency for my purposes, but if I am limited to the dsquery command, I would like to know how to get the results to just list the name of the Account or Group, instead of the full CN
dsquery group "DC=company,DC=com" -name "Administrators" | dsget group -members -expand