简体   繁体   中英

In which folder to run this PowerShell script?

I am following the example . It is publishing an ASP.NET application to a docker container on a remote Linux sever.

There is a small piece of work to run script. Let's quote it.

Also be sure to explore the PublishProfiles folder that gets created in your Visual Studio project under "Properties." A PowerShell script and a Shell script get created in that folder that you can use to publish your app from the command line. For example:

.\hanseldocker-Docker-publish.ps1 -packOutput $env:USERPROFILE\AppData\Local\Temp\PublishTemp -pubxmlFile .\hanseldocker-Docker.pubxml

I am not sure the location of .\\ . Actually I am using Bamboo to build it, I have to place the script into the body.

图片 .

I don't know whether I should modify the script because of .\\ ?

Get a solution at here.

To launch it using the regular old, command line and pass any powershell script as a parameters.

C:\Windows\System32\cmd.exe /c "echo Hesus | C:\WINDOWS\SysWOW64\WindowsPowerShell\v1.0\powershell.exe %*"

Put this in the Argument:

scripts\RemoteWSPDeployment.ps1 –parameter1 value1 –parameter2 value2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM