?
Solved

Using Powershell and the Quest ActiveRoles shell to query multiple domains

Posted on 2011-09-26
4
Medium Priority
?
1,856 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 720 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 1280 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

770 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