WMIC USERACCOUNT WHERE "Name='PutUserNameHere' and Domain='PutDomainNameHere'" GET Lockout
The above command will get back a "FALSE" response. But one more question, if I run this command in VBScript, how can I get back the result "FLASE" inside the script?
~~~
set WshShell = CreateObject("WScript.Shell")
rc=WshShell.Run("WMIC USERACCOUNT WHERE 'Name='PutUserNameHere' and Domain='PutDomainNameHere'' GET Lockout")
#rc==0 if command success.
# How to get the command output here? If not writing to a file.
# I want to send an email if it's not "FLASE"
~~
Thanks.
The above command will get back a "FALSE" response. But one more question, if I run this command in VBScript, how can I get back the result "FLASE" inside the script?
~~~
set WshShell = CreateObject("WScript.Shell")
rc=WshShell.Run("WMIC USERACCOUNT WHERE 'Name='PutUserNameHere' and Domain='PutDomainNameHere'' GET Lockout")
#rc==0 if command success.
# How to get the command output here? If not writing to a file.
# I want to send an email if it's not "FLASE"
~~
Thanks.