Friday, February 20, 2009

Change Domain Functionality Level using script

The following snippet illustrates changing domain functionality level to windows 2000.

strDomain = "myrootdns2003.com" ' e.g. amer.rallencorp.com

set objDomain = GetObject("LDAP://" & strDomain)
if objDomain.Get("nTMixedDomain") > 0 Then
Wscript.Echo "
Changing mode to native … "
objDomain.Put "nTMixedDomain", 0
objDomain.SetInfo
else
Wscript.Echo "Already a native mode domain"
end if

0 comments:

Design by infinityskins.blogspot