I have multiple bash commands.
In real time i type command, then enter, then enother command and enter again. etc
How i can use all command in 1 $script?
This dos'nt work:
$script = "
Invoke-VMScript -VM MyVM -ScriptType bash -ScriptText $script -GuestUser root -GuestPassword P@ssw0rd
They are, but it depends how you defined the script as inline text (with or without variable substitution), and if you escaped the dollar signs in the variables if you selected variable substitution.
Can you share you code, so I can have a look?