When you create a Teams meeting in Outlook for another user, you get the error:…
You want to know if your Active Directory (AD) is up to date. For example, you want to check and verify the Exchange 2016 schema version before and after an upgrade to Exchange 2016 CU16. Read the article, if you need to prepare Active Directory and domains for Exchange Server. In this article, you will learn how to check the Exchange schema version with PowerShell.
Table of contents
Why checking Exchange Schema version information
It’s good to check and verify the Exchange Schema version, for example:
- Before updating Exchange Server to a new version
- Before installing a new Exchange Server
- After preparing Active Directory and domains for Exchange Server
Get Exchange Schema version with PowerShell commands
Run PowerShell as administrator. Run the following commands one by one.
PS C:\> # Exchange Schema Version PS C:\> $sc = (Get-ADRootDSE).SchemaNamingContext PS C:\> $ob = "CN=ms-Exch-Schema-Version-Pt," + $sc PS C:\> Write-Output "RangeUpper: $((Get-ADObject $ob -pr rangeUpper).rangeUpper)" RangeUpper: 15332 PS C:\># Exchange Object Version (domain) PS C:\>$dc = (Get-ADRootDSE).DefaultNamingContext PS C:\>$ob = "CN=Microsoft Exchange System Objects," + $dc PS C:\>Write-Output "ObjectVersion (Default): $((Get-ADObject $ob -pr objectVersion).objectVersion)" ObjectVersion (Default): 13237 PS C:\># Exchange Object Version (forest) PS C:\>$cc = (Get-ADRootDSE).ConfigurationNamingContext PS C:\>$fl = "(objectClass=msExchOrganizationContainer)" PS C:\>Write-Output "ObjectVersion (Configuration): $((Get-ADObject -LDAPFilter $fl -SearchBase $cc -pr objectVersion).objectVersion)" ObjectVersion (Configuration): 16217
Get Exchange Schema version with Get-ADversions script
Download the script Get-ADversions.ps1 and save it in the C:\scripts\ folder. Run PowerShell as administrator. Make sure that you set the Execution Policy to Unrestricted. Press Y and Enter. If you don’t, the script will not run.
PS C:\> Set-ExecutionPolicy Unrestricted Execution Policy Change The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose you to the security risks described in the about_Execution_Policies help topic at http://go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): Y
Adjust the path to the C:\scripts\ folder and run the Get-ADversions.ps1 script.
PS C:\> cd C:\scripts\ PS C:\scripts> .\Get-ADversions.ps1 RangeUpper: 15332 ObjectVersion (Default): 13237 ObjectVersion (Configuration): 16217
After running the PowerShell script, you will see an output of the Active Directory versions.
RangeUpper = 15332
ObjectVersion (Default) = 13237
ObjectVersion (Configuration) = 16217
The next step is to check and verify the schema.
Check and verify Active Directory versions
How to confirm the Exchange Active Directory versions? Visit the Microsoft Docs page and scroll to the bottom of the page to find the Active Directory versions. The list is being kept up to date by Microsoft.
We can confirm that Exchange 2016 Schema version is up to date for Exchange 2016 CU16. In fact, Exchange 2016 CU15, Exchange 2016 CU14, and Exchange 2016 CU13 are eligible as well.
To sum it up, you learned how to check and verify the Exchange schema version with PowerShell. Run the Get-ADversions.ps1 PowerShell script and check if the Active Directory versions are correctly shown.
Did you enjoy this article? If so, you may like Exchange Server in DMZ or LAN network. Don’t forget to follow us and share this article.