How to assign the result of a 'session.ExecuteCommand' in a variable using powershell script
Hello,
While using a WINSCP remote execution powershell script, is there an option to assign the result of command executed through 'session.ExecuteCommand' to another variable?
For instance:
The above command works as expected.
In order to assign the result of
The following command line didn't work.
The error message was 'CommandExecutionResult' is not a recognized command (within Powershell).
Thanks
While using a WINSCP remote execution powershell script, is there an option to assign the result of command executed through 'session.ExecuteCommand' to another variable?
For instance:
$var1="remote command1" $session.ExecuteCommand($var1)
In order to assign the result of
$session.ExecuteCommand($var1)
into a variable(say $var2
), is there an option using WINSCP powershell?
The following command line didn't work.
CommandExecutionResult $var2=$session.ExecuteCommand($var1)
Thanks