[英]How do I run a PowerShell script on an Azure App Service running Linux?
Using SSH to remote into the App Service I'm greeted with this message:使用 SSH 远程访问应用服务,我收到以下消息:
root@05831a60f815:/home# pwsh
-bash: pwsh: command not found
It would appear that Microsoft's new PowerShell Core is not installed on Azure's Linux containers.微软的新 PowerShell Core 似乎没有安装在 Azure 的 Linux 容器上。
Where do I define that I want PowerShell to be installed on my Linux deployment?我在哪里定义我希望在我的 Linux 部署中安装 PowerShell?
We have defined ubuntu-latest
as our vmImage
in our Azure DevOps CI.我们在 Azure DevOps CI 中将
ubuntu-latest
定义为vmImage
。
It usually can be done from App Service Extension
under Development Tools line.它通常可以通过开发工具行下的
App Service Extension
来完成。 But in this case it doesn't have any option for PowerShell, so I believe you would need to install it manually.但在这种情况下,它没有任何 PowerShell 选项,因此我相信您需要手动安装它。
https://docs.microsoft.com/ru-ru/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7 https://docs.microsoft.com/ru-ru/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.