Check objectVersion on all Domain Controllers after schema update with PowerShell

Posted by on Feb 2, 2013 in Active Directory, Powershell | 1 comment

Just copy and paste into PowerShell (Active Directory Module for Windows PowerShell) to get the version of AD schema on all domain controllers in current domain:

$schemaContext = Get-ADRootDSE | %{$_.schemaNamingContext}

Foreach ($dc in ([System.DirectoryServices.ActiveDirectory.DomainController]::findall(
   (new-object System.DirectoryServices.ActiveDirectory.DirectoryContext("Domain",$env:USERDNSDOMAIN)))) | 
   %{$_.name})
{
	$path = 'LDAP://' + $dc + '/' + $schemaContext
	$Object = [adsi]$path
	$dc + '  ' + $Object.objectversion
}

AD Schema objectVersion on all Domain Controllers

One Comment

  1. Thank you…

Leave a Reply

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

Captcha: * Time limit is exhausted. Please reload CAPTCHA.