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
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
    LVL 10

    Accepted Solution

    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

    Yes, thank you. i will need to pull the attributes of a newly created user.
    LVL 17

    Expert Comment

    by:Premkumar Yogeswaran
    LVL 10

    Expert Comment

    by:Prashant Girennavar
    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Microsoft Windows Server Update Service (WSUS) is free for everyone, but it lacks of some desirable features like send an e-mail to the administrator with the status of all computers on the WSUS server. This article is based on my PowerShell script …
    Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
    Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
    With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

    737 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

    18 Experts available now in Live!

    Get 1:1 Help Now