I have the following code:
& $Plinkpath -P "22" -v "User@Server" -pw $passw $commands3 | Out-File $Report -Append -Encoding utf8
This outputs a file with the information needed but I want to store the plink sentence result into a variable.
I tried:
& $Plinkpath -P "22" -v "User@Server" -pw $passw $commands > $Example
$Example = $Plinkpath -P "22" -v "User@Server" -pw $passw $commands
And nothing works :(
How can I get the command output into a variable?