AD: Domain controllers – discover what you’ve got

Hey everyone, Theron (aka T-) here, Senior Consultant with Microsoft Consulting Services (MCS) specializing in Active Directory.

During an engagement with a customer a couple of years ago, I needed to identify some info regarding their domain controllers. They were in the process of deploying System Center Operations Manager (SCOM) at the time, but it wasn’t monitoring the DCs yet, so I couldn’t use it for the what I needed. They had ‘another’ management product that may have provided the info, but I wasn’t familiar with it and didn’t think trying to figure it out was worth the time it would’ve taken. Besides, that wouldn’t have been as interesting as scripting it.

So, with the assistance of a colleague, I wrote a quick script to gather pertinent info about all of the domain controllers in their environment. As with all of my scripts, there may be better ways of doing things, but this accomplished my goals. Also, with this particular script, there are probably things that could be added that would be valuable, but again, this accomplished my goals.

Basically, it’ll connect to each DC in the domain, gather the info and output it into a CSV which will be located in \Documents\Domain_Discovery_Output. The more domain controllers you have, the longer it’ll take to finish. Also, you’ll need to ensure Remote PowerShell requirements are met.

The script is written in PowerShell and located here.

It performs the following:

  •     Checks to see if Domain_Discovery_Output folder exists. 
    •         If not, creates one under $Home\Documents. 
  •     Outputs a csv file to the Domain_Discovery_Output folder. 
  •     Gathers the following information about your domain controllers: 
    •         Server Name 
    •         Domain Name 
    •         Manufacturer 
    •         Model 
    •         Physical memory 
    •         OS caption 
    •         OS version 
    •         # of cores 
    •         CPU name 
    •         IP Address 
    •         DeviceID (hard drive letter) 
    •         HD size in GB 
    •         HD free space in GB 
    •         HD % free 
    •         NTDS and SYSVOL locations 

Enjoy

Roll Tide,

T-

One thought on “AD: Domain controllers – discover what you’ve got

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.