Link to home
Start Free TrialLog in
Avatar of Harrison Aten
Harrison AtenFlag for United States of America

asked on

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

Does anyone know of a powershell script that will remotely run a Global Catalog query against a specific DC
ASKER CERTIFIED SOLUTION
Avatar of Prashant Girennavar
Prashant Girennavar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Harrison Aten

ASKER

Yes, thank you. i will need to pull the attributes of a newly created user.
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.

Thanks,

-Prashant Girennavar.