Solved

Using Powershell and the Quest ActiveRoles shell to query multiple domains

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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

A brief introduction to what I consider to be the best editor for PowerShell.
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
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…

680 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