在PowerShell中删除自动确认 [英] Automatic confirmation of deletion in powershell

查看:467
本文介绍了在PowerShell中删除自动确认的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行下面的命令:

get-childitem C:\temp\ -exclude *.svn-base,".svn" -recurse | foreach ($_) {remove-item $_.fullname}

这促使我非常频繁是这样的:

Which prompts me very frequently like this:

Confirm
The item at C:\temp\f\a\d has children and the Recurse parameter was not specified. If you continue,
all children will be removed with the item. Are you sure you want to continue?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): 

如何可以拥有它自动设置为A?

How can I have it automatically set to "A"?

推荐答案

尝试使用 -Force 参数上删除-项目

这篇关于在PowerShell中删除自动确认的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆