Check Domain Status

On error resume next
Set objRootDSE = GetObject(“LDAP://RootDSE”)
If Err.number <> 0 Then
Wscript.echo “off domain”
Else
Wscript.echo “on domain”
End If
On Error Goto 0

email me