Solved

Using Powershell and the Quest ActiveRoles shell to query multiple domains

Posted on 2011-09-26
4
1,808 Views
Last Modified: 2012-05-12
Hi guys hope you are all well and can assist.

We have multiple domains in our environment.

domainA.com
domainB.com
domainC.com

I am located in domainA, and have domain admin access to domainB, and C.

The following works fine in domainA

Get-QADGroup -SearchRoot "Domain Admins" | Get-QADGroupMember | get-qaduser

If I try and run the same query against a different domain eg.domainB, it does not work, and defaults to returning domainA details.

Now, if I run the Quest ActiveRoles shell as a domain admin user in domainB, and do the following:

Get-QADGroup -SearchRoot "Domain Admins" | Get-QADGroupMember | get-qaduser

Now it returns the correct information for domainB.

My question is this.

If the reason I am having issues is due to the account that is using to run this, and I need to use a different account to "connect" to each domain, can I do this, and if so, how through script?

Any help greatly appreciated.
0
Comment
Question by:Simon336697
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 18

Assisted Solution

by:x-men
x-men earned 180 total points
ID: 36708874
if your domains B and C trust domain A, give your domain A account permissions on the B and C domains
0
 
LVL 27

Accepted Solution

by:
KenMcF earned 320 total points
ID: 36897387
I am not sure what you are trying to get from your query but here is an example to get all the users in a group from another doamin


Get-QADGroupMember "Student\domain admins" | Select name, samaccountname

or

Get-QADGroupMember "domain admins" -service "child.domain.local" | Select name, samaccountname
0
 
LVL 1

Author Comment

by:Simon336697
ID: 36946268
Thanks so much guys sorrry about the delay.
0
 
LVL 1

Author Closing Comment

by:Simon336697
ID: 36946271
Thanks so much guys sorrry about the delay.
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Windows 10 came with  a lot of built in applications, Some organisations leave them there, some will control them using GPO's. This Article is useful for those who do not want to have any applications in their image (example:me).
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question