I have a question regarding Windows Script Host remote script process. I am trying to execute a script on a remote computer and return the results of that script to the controller script.
For example, if I execute the script below on a remote computer, I would like to return the value of curDomainUser to the controller script on the computer that I execute the remote script from. Is it possible to pass a value from the remote script back to the controller script?
Script Code
Dim objShell, curDomainUser
Set objShell = WScript.CreateObject("WScript.Shell")
curDomainUser = objShell.ExpandEnvironmentStrings("%USERDOMAIN%") &_
"" &
objShell.ExpandEnvironmentStrings("%USERNAME%")
'Would like to return curDomainUser to controller script.
WScript.Echo curDomainUser
--------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks for your time!
Software/Hardware used:
ASKED:
September 17, 2008 7:46 PM
UPDATED:
September 17, 2008 7:57 PM