Code Script .co.uk

Home | Scripts | Tutorials | Disclaimer | Sitemap | Contact

   Raise Domain Functional Level
 

Vbscript / Active Directory / Raise Domain Functional Level

Raise the domain functional level to Windows Server 2003 (non-reversible).


strDomain = "DC=mydomain,DC=local"

Set objDomain = GetObject("LDAP://" & strDomain)
objDomain.GetInfo
If objDomain.Get("msDS-Behavior-Version") <> 2 Then
   Wscript.Echo "Changing domain  functional level to Windows Server 2003."
   objDomain.Put "msDS-Behavior-Version", 2
   objDomain.SetInfo
Else
   Wscript.Echo "Domain functional level already at Windows Server 2003."
End If





Please note that a disclaimer applies to any code on this page.
 
   Actions
  Go Back
  Bookmark
  Print Page


   Menu
 
- Links
- Reference
- Script Editors
- Tutorials
- Vbscript
     - Active Directory
          - Ad User Information Query
          - Add Machine To Domain
          - Add User To Group
          - Create Group
          - Create Ou Structure
          - Enumerate Ad Users
          - Enumerate Group Members
          - Move Users And Groups Between Ous
          - Raise Domain Functional Level
     - Exchange
     - Files And Folders
     - General
     - Ms Office
     - Operating System
     - Processes And Services
     - Text Processing
     - User Interaction
     - Web Servers