Avatar of Simon336697
Simon336697Flag for Australia asked on

Identifying what domain controllers are not global catalogs

Dear everyone,

I hope you are all well and can assist.

I would like to build a query at does the following:

1) Gets a list of all domain controllers
2) For each domain controller, determine if it is a global catalog or not
3) Write to a file the names of the domain controllers that are not global catalogs

Any help greatly appreciated.
Active DirectoryShell ScriptingScripting Languages

Avatar of undefined
Last Comment
Simon336697

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Mike Kline

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
Simon336697

Hi mike, you are a champion.
ASKER
Simon336697

Mike, with the returned domain controllers that are not GCs, is there a way to loop through that list and add the GC role to them?
Mike Kline

You would have to pipe it into admod.  I'd have to test it out.  Don't want to give you code that doesn't work.

How many do you have?

Thanks

Mike
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
SOLUTION
seanab

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
Simon336697

Thanks so much