If you retrieve a script argument using the WinNT provider, you can use the Class property of the object to
determine what type of object the argument was.
If your c:\util\test0.vbs script contains:
Dim objArguments, strDomainUser, Cls Set objArguments = Wscript.Arguments If WScript.Arguments.Count = 0 then Wscript.Quit strDomainUser=objArguments(0) Cls="NOT FOUND" On Error Resume Next Set objUser = GetObject("WinNT://" & strDomainUser ) Cls=objUser.Class Wscript.EchoThen see the following:" & Cls Wscript.Quit" & strDomainUser &
cscript //nologo c:\util\test0.vbs "JSIINC/Domain Admins" "JSIINC/Domain Admins" Group cscript //nologo c:\util\test0.vbs "JSIINC/Jerry" "JSIINC/Jerry" User cscript //nologo c:\util\test0.vbs "JSIINC/JSI001" "JSIINC/JSI001" Computer cscript //nologo c:\util\test0.vbs "JSIINC" "JSIINC" Domain
0 comments
Hide comments