[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Does anyone know of a power shell script that will remotely run a Global Catalog query against a specific DC?

Posted on 2014-07-16
Medium Priority
Last Modified: 2014-07-17
Does anyone know of a powershell script that will remotely run a Global Catalog query against a specific DC
Question by:hlaten
  • 2
LVL 10

Accepted Solution

Prashant Girennavar earned 2000 total points
ID: 40199068
Yes we can query global catalog domain controllers via , powershell.

What you want to query ?? Please let us know so that we can help you with that.

-Prashant Girennavar.

Author Comment

ID: 40199124
Yes, thank you. i will need to pull the attributes of a newly created user.
LVL 10

Expert Comment

by:Prashant Girennavar
ID: 40201693
OK ,
I have sample script which queries AD for basic attributes

below is the code

import-module activedirectory
 Get-ADUser -Filter * -Server <Domain contorller Name> -properties * | select Name,displayname,emailaddress | Export-Csv C:\ADu
serInformation.csv -NoTypeInformation

Open in new window

Make sure to put Domain controller name before you run the script.


-Prashant Girennavar.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Let's recap what we learned from yesterday's Skyport Systems webinar.
Transferring FSMO roles is done when an admin wants to split roles between certain Domain Controllers or the Domain Controller holding the Roles has been forcefully demoted using dcpromo / forceremoval
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

834 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