【发布时间】:2018-02-16 17:03:58
【问题描述】:
我有一个命令将文件从竹复制到 Windows 机器。我正在使用竹子的 powershell 解释器,但它失败并出现错误:
由于 [powershell -ExecutionPolicy 绕过的返回码] 导致任务失败 -命令 /bin/sh /usr/local/bamboo/agent1-home/temp/TAF-EL-JOB1-25-ScriptBuildTask-1469152609455458957.ps1] 为 -1 而预期为 0
下面是两行代码
net use \\10.103.200.45\LU1 Password123! /USER:administrator@vlab.local /PERSISTENT:NO | Out-Null
Copy-Item -Path pkfolder\* -Destination \\10.103.200.45\LU1 -Force -PassThru -Verbose
但是在 windows powershell CLI 中执行相同的代码?
【问题讨论】:
-
你为什么用
NET USE而不是New-PSDrive?
标签: powershell continuous-integration bamboo