Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to split long commands over multiple lines in PowerShell

Tags:

powershell

How do you take a command like the following in PowerShell and split it across multiple lines?

&"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:contentPath="c:\workspace\xxx\master\Build\_PublishedWebsites\xxx.Web" -dest:contentPath="c:\websites\xxx\wwwroot\,computerName=192.168.1.1,username=administrator,password=xxx" 
like image 616
asgerhallas Avatar asked Apr 09 '10 14:04

asgerhallas


1 Answers

Trailing backtick character, i.e.,

&"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" ` -verb:sync ` -source:contentPath="c:\workspace\xxx\master\Build\_PublishedWebsites\xxx.Web" ` -dest:contentPath="c:\websites\xxx\wwwroot,computerName=192.168.1.1,username=administrator,password=xxx" 

White space matters. The required format is Space`Enter.

like image 159
Colin Pickard Avatar answered Oct 07 '22 07:10

Colin Pickard