Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Sql from ad import

Posted on 2008-10-13
3
Medium Priority
?
150 Views
Last Modified: 2010-03-19
Is there a way i can run a query to see all users in or active directory. We have two domains? I have done this before for one domain but not both.

Thanks in advance
0
Comment
Question by:jimseiwert
  • 2
3 Comments
 
LVL 30

Expert Comment

by:LauraEHunterMVP
ID: 22707399
If both domains are in the same forest, perform a query against a global catalog server.

If the domains are in separate forests, you will need to perform 2 separate queries.
0
 
LVL 2

Author Comment

by:jimseiwert
ID: 22707906
can you show me an example of "perform a query against a global catalog server."

Thanks
0
 
LVL 30

Accepted Solution

by:
LauraEHunterMVP earned 2000 total points
ID: 22707912
Set your search root to <GC://dc=forestrootdomain,dc=com>, rather than <LDAP://dc=domain,dc=com>, which is what I imagine you're using currently.
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

885 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