小编Spa*_*key的帖子

强制不在非交互模式下工作

Deleting folder 'C:\agent\_work\2\a\Foo\_PublishedWebsites\Foo\sourcejs'

Remove-Item : Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available.
At C:\agent\_work\2\s\Build\Deployment\PrepareWebsites.ps1:29 char:2
+ Remove-Item -Path $source -Force -Confirm:$false | Where { $_.PSIsContainer }
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Remove-Item], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.RemoveItemCommand

Process completed with exit code 1 and had 1 error(s) written to the error stream.
Run Code Online (Sandbox Code Playgroud)

我尝试添加-Force和-Confirm:$ false但我仍然遇到此错误.使用TFS 2015构建.有人有任何想法吗?

powershell

7
推荐指数
1
解决办法
6839
查看次数

标签 统计

powershell ×1