Solved

Using Powershell and the Quest ActiveRoles shell to query multiple domains

Posted on 2011-09-26
4
1,762 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
  • 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article will help you understand what HashTables are and how to use them in PowerShell.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

760 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now