I obviously don\'t know what I\'m doing.
I have finally got this PowerShell command to work. But I can\'t figure out why it works.
My concern is the final \"\" c
One of the areas at fault here is the inability of PowerShell to cope with the translation of the whitespace between "Program Files" expressed in the cmd-based msdeploy.
This is an extremely basic solution and leverages antiquated DOS limitations, but the following non-whitespace references can be used in their stead:
\Program Files\ ... \Progra~1\
\Program Files (x86)\ ... \Progra~2\
It's lame, but it works.
You can also create a function that calls cmd and executes your command. This example also assumes what you're trying to call (msdeploy, etc.) is in the path.
function PushToTarget() {
cmd.exe /C $("msdeploy.exe -verb:sync -source:apphostconfig=yourwebapp-dev -dest:archivedir=d:\backup")
}