A. The script below, which you can download here will display the domain mode of a specified domain:

If Wscript.Arguments.Count <br>Run the script by using the following command: <br>C:\temp>cscript showdomainmode.vbs savilltech.com<br><br><p><br>To check the forest mode, run the following script with no parameters to display the forest mode of the forest of the client that the script runs on. You can download the script <a href="/content/content/50156/forestmode.zip">here</a></p>set objRootDSE = GetObject("LDAP://RootDSE")<br>set objDomain = GetObject("LDAP://cn=partitions," & objRootDSE.Get("configurationNamingContext") )<br>if objDomain.Get("msDS-Behavior-Version") = 2 then<br>  Wscript.Echo "Windows Server 2003"<br>ElseIf objDomain.Get("msDS-Behavior-Version") = 1 then<br>  script.Echo "Windows 2003 Interim"<br>Else<br>  Wscript.Echo "Windows 2000"<br>End If<br><br>