Created
August 28, 2019 07:11
-
-
Save norman-bauer/fcc470770f4aa22ac2abfaa2ec4cc2ec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $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 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment