"Jesper Ravn" <> wrote in message
news:%...
> Hello
>
> How can I retrive the AD Schema Version from pure VBS or VB.net.
> Ex. Windows 2008 = 44 or Windows 2008 R2 = 47.
>
> Thanks,
>
> /Jesper
This link should help:
http://support.microsoft.com/kb/556086
In VBScript
:
=======
Option Explicit
Dim objRootDSE, strSchema, objSchema
' Determine DNS domain name.
Set objRootDSE = GetObject("LDAP://RootDSE")
strSchema = objRootDSE.Get("schemaNamingContext")
Set objSchema = GetObject("LDAP://" & strSchema)
Wscript.Echo "Schema Version: " & objSchema.objectVersion
--
Richard Mueller
MVP Directory Services
Hilltop Lab -
http://www.rlmueller.net
--