Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Get AD Schema Version

Reply
Thread Tools Display Modes

Get AD Schema Version

 
 
Jesper Ravn
Guest
Posts: n/a

 
      10-28-2009
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
 
Reply With Quote
 
 
 
 
Richard Mueller [MVP]
Guest
Posts: n/a

 
      10-28-2009

"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
--


 
Reply With Quote
 
Jesper Ravn
Guest
Posts: n/a

 
      10-28-2009
"Richard Mueller [MVP]" <rlmueller-> skrev i
meddelelsen news:Oo6zju#...
>
> "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


Hi Richard

Thanks a lot, it's working.
Case closed :-)

/Jesper

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista Beta version Indiemo1 Windows Vista Installation 16 04-05-2008 08:58 PM
No MEDIA CENTERE with VISTA REINSTALL adamfez Windows Vista Installation 4 08-20-2007 01:50 PM
Vista won't show file version unless extension is changed to DLL anon0918 Windows Vista Performance 2 08-12-2007 04:56 PM
Install Business version with Ultimate version dvd olant Windows Vista Installation 7 07-06-2007 04:27 PM
Error reports what do they mean Joe83 Windows Vista Hardware 1 06-07-2007 03:35 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59