Hello all,
A question; I need to determine a user's domain through a script. I'm scoobied. If anyone knows of some bizarre undocumented command that would provide this information, I'd be delerious with joy and gratitude...
Thanks, Ian
Detecting a user's domain
Moderators: Dorian (MJT support), JRL
This gets the current user's domain name. Not sure if that's what you really want though:
VBSTART
Set WSNet = CreateObject( "WScript.Network" )
sUsername = WSNet.UserName
sUserdomain = WSNet.UserDomain
VBEND
VBEVal>sUserdomain,domain
VBEval>sUsername,username
VBSTART
Set WSNet = CreateObject( "WScript.Network" )
sUsername = WSNet.UserName
sUserdomain = WSNet.UserDomain
VBEND
VBEVal>sUserdomain,domain
VBEval>sUsername,username
MJT Net Support
[email protected]
[email protected]