Closed
Description
[Note double underscore is escaped by the comment parser]
In create-vmfleet.ps1 line 163 CONNECTPASS is replaced with the raw password provided in parameter $connectpass without being escaped. This means if the password includes a character such as " the launch script inside the vm will not run due to syntax error. Proposed patch below (rough draft doesnt escape everything like ' )
$escapedpassword = "'" + $using:connectpass + "'"
gc C:\ClusterStorage\collect\control\launch-template.ps1 |% { $_ -replace 'CONNECTUSER',$using:connectuser -replace 'CONNECTPASS',$escapedpassword } > z:\users\administrator\launch.ps1