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
Lab Core | The Lab of MrNetTek
A blog about IT, technical solutions, and code.