积硅步,行千里
分类: WINDOWS
2012-06-14 12:45:37
'****定义获取网络域账户****
set wshNetwork = WScript.CreateObject("WScript.Network") wscript.echo "登陆域"&wshNetwork.UserDomain wscript.echo "计算机名"&wshNetwork.ComputerName wscript.echo "当前登陆用户"&wshNetwork.UserName
'****获取AD登陆用户名称****
Set objDomain = CreateObject("ADSystemInfo") Set objUser = GetObject("LDAP://" & objDomain.UserName) 'WScript.Echo objUser.Displayname & wshNetwork.UserName 'WScript.Echo "当前用户位置:" &objDomain.UserName |