Post by Vilius MockûnasHi,
How do I tell if account I'm running my script is domain account or local ?
I'm using vbscript.
thanks
Vilius
I code similar to the following:
=======
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
If (Err.Number = 0) Then
strUserDN = objSysInfo.UserName
If (Err.Number = 0) Then
On Error GoTo 0
blnDomain = True
Else
On Error GoTo 0
blnDomain = False
End If
Else
On Error GoTo 0
blnDomain = False
End If
========
If blnDomain is True, the user is authenticated to AD. There may be other
ways, but I chose this method because it times quickly if the user is not
authenticated to a domain. I'd be interested to know if anyone has other
methods.
--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--