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构建。有人有什么想法吗?
发布于 2016-07-12 17:03:03
Remove-Item -path 'C:\agent\_work\2\a\Foo\_PublishedWebsites\Foo\sourcejs\*' -Recurse -Force -EA SilentlyContinue -Verbose
https://stackoverflow.com/questions/38334539
复制相似问题