[英]Command works directly in Powershell but doesn't work when executed through a linux system using powershell
[英]Powershell command works manually, but does not work when executed in Jenkins
我有一個奇怪的場景,我的命令手動在 PowerShell 上運行,但在 Jenkins PowerShell 插件上執行時卻不行。 我是 PowerShell 和 Jenkins 的新手,我想我缺少一條規則。 我在這里和網上到處找,但我沒有找到解決方案。
我創建了一個執行 PowerShell 腳本的作業,該腳本使用自由式項目在我的桌面上打開一個 RDP 文件。 在 Powershell 上執行時,它按預期工作,但在 Jenkins 中,構建成功,但沒有打開 RDP。
這是腳本:
Start-Process "$env:windir\system32\mstsc.exe" -ArgumentList "RDP File /h:900 /w:1600" -WindowStyle Minimized
我正在使用 Windows 服務器 2016。
這是我嘗試過的:
這真的是 PowerShell 插件的行為嗎? 有什么我遺漏的地方嗎? 請幫我解決這個問題。
任何人都可能需要這個。 我能夠通過 Jenkins PowerShell 插件執行 RDP。
我所做的是 go Jenkins 的 Window 服務 > 登錄選項卡 > Select “此帳戶”並輸入您的用戶帳戶憑據。
我懷疑這是一個安全問題。 Jenkins 默認使用沒有足夠權限的“SYSTEM”帳戶。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.