繁体   English   中英

PowerShell 命令启动进程未在远程执行

[英]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.

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