3
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.
我试过添加-Force和-Confirm:$ false,但仍然出现此错误。使用TFS 2015构建。任何人有任何想法?强制在非交互模式下不工作
你的命令在哪里?你使用'-Recurse'吗? –
谢谢,-Recurse标志丢失。原始命令如上:Remove-Item -Path $ source -Force -Confirm:$ false |凡{{_。PSIsContainer} –