PowerShell Script to Check Active Directory System Requirements

The system requirements for Exchange Server 2013 include the following for Active Directory:

  • Forest and domain functional level of Windows Server 2003 or higher (up to Windows Server 2012 R2 is supported with Exchange Server 2013 SP1 or later)
  • Schema Master running Windows Server 2003 SP2 or later
  • At least one global catalog server in each Active Directory site where Exchange 2013 will be installed that runs Windows Server 2003 SP2 or higher

Using PowerShell we can retrieve all of this information quickly.

Here is a quick and dirty script I wrote that breaks a whole lot of PowerShell “rules” but gets the job done. I’ll probably try and improve it in the near future, but for now it gets me the information I need, which is all I really need any script to do.

Download the script from Github

The script requires the ActiveDirectory PowerShell module, and in a multi-domain forest should be run in the forest root domain with an admin account that can access each domain.

Example output:

[PS] C:\Scripts>.\Get-ADInfo.ps1
*** Forest: exchangeserverpro.net ***

Forest Mode: Windows2003Forest
Schema Master: S1DC1.exchangeserverpro.net
Domain Naming Master: S1DC1.exchangeserverpro.net
UPN Suffixes: esp.local

*** Domain: exchangeserverpro.net ***

Domain Mode: Windows2003Domain
PDC Emulator: S1DC1.exchangeserverpro.net
Infrastructure Master: S1DC1.exchangeserverpro.net
RID Master: S1DC1.exchangeserverpro.net

*** Global Catalogs by Site/OS ***

Site, OS                                       Count
--------                                       -----
DataCenter1, Windows Server 2012 R2 Datacenter     1


  1. David Ray says

    It seems like Microsoft did something is some update to cause Get-ADDomainContoller -Filter to not work as expected (like it used to).
    I got this script to work by replacing
    Line 117: $domaincontrollers =@(Get-ADDomainController -Filter {IsGlobalCatalog -eq $true})
    Line 117: $domaincontrollers = @(Get-ADForest | Select -ExpandProperty GlobalCatalogs | foreach{Get-ADDomainController $_})

    Different way to get the same information.

Leave a Reply

Your email address will not be published. Required fields are marked *