简体   繁体   English

在哪个文件夹中运行此PowerShell脚本?

[英]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. 它正在将ASP.NET应用程序发布到远程Linux服务器上的docker容器。

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." 另外,请确保浏览在Visual Studio项目的“属性”下创建的PublishProfiles文件夹。 A PowerShell script and a Shell script get created in that folder that you can use to publish your app from the command line. 将在该文件夹中创建一个PowerShell脚本和一个Shell脚本,您可以使用该脚本从命令行发布应用程序。 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. 实际上,我正在使用Bamboo来构建它,我必须将脚本放入正文中。

图片 .

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. 要使用常规的旧命令行启动它,并传递任何powershell脚本作为参数。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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