I (and apparently many people on the internet) been struggling with calling msdeploy.exe with variables that contain spaces. Here is an example:
$msdeploy=Get-Command ‘C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe’
& $msdeploy -verb:sync -source:contentPath="’$src’" -dest:contentPath="’$dest’"
I can call it when there are no spaces. I can call it with literal values.
Can anyone tell me how to accomplish calling msdeploy.exe with variables that contain spaces for the parameters? (Warning: everyone else has gone bald pulling out their hair)