[英]PowerShell command Start-Process not getting executed on remote
我有以下PowerShell
腳本,該腳本在deploy
sql server
windows server 2019
的節點上運行Jenkins
$Username = $args[0]
$Password = $args[1]
$Env= $args[2]
$pass = ConvertTo-SecureString -AsPlainText $Password -Force
$Cred = New-Object System.Management.Automation.PSCredential -ArgumentList $Username,$pass
echo "******** Start SQL Deploy ********"
echo "----- B4 Start-Process Powershell.exe -----"
Start-Process -FilePath "msbuild" -ArgumentList '"Database Services\Database Services.sqlproj"','/t:deploy','/p:Configuration=Release','/p:TargetConnectionString=$Env','/p:BlockOnPossibleDataLoss=True','/p:TargetDatabase="test"','-fl','-flp:logfile=msbuild.log' -wait -LoadUserProfile -credential $cred
echo "----- After Start-Process Powershell.exe -----"
我的 output 是:
******** Start SQL Deploy ********
----- B4 Start-Process Powershell.exe -----
----- After Start-Process Powershell.exe -----
我們可以清楚地看到Start-Process
沒有被執行。 重要的是說它對我來說在本地工作,只有當我開始使用node
時,它才開始發生。
我在 jenkins 論壇上看到了類似的問題,但沒有人對此發表評論: JENKINS-63978
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.