You know an account, hence you have its info at hand. You want to verifiy if it exists. To do it, you bind to it simplest using WinNT: provider. If it error out? it does not exist.
[tt]
on error resume next
set ouser=getobject("WinNT://" & scomputer & "/" & username & ",user")
if err.number<>0 then
wscript.echo "The user account does not exist."
err.clear
'do something necessary
end if
on error goto 0
[/tt]
regards - tsuji
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.