测试服务器只有C盘,固定大小,多人共享,每月重启升级,有时候会出现磁盘空间不足的问题,所有需要查找某台服务器上的大文件

Get-ChildItem "c:" -Recurse | sort -descending -property length | select -first 10 name, Length可以说,相当慢了......
最直观的就是排除C:Windows文件夹,然后再递归遍历其他文件(夹),看一下
Get-ChildItem "c:" -Exclude "Windows"运行了没输出。
难道Exclude的使用方式不对吗?
说明使用没有问题,可是why?
google了下,看到有人给官方提的issue,官方也标记为Bug了。
https://github.com/PowerShell/PowerShell/issues/11649
https://stackoverflow.com/questions/38269209/using-get-childitem-exclude-or-include-returns-nothing/38308796
Get-ChildItem "c:" -Exclude "Windows"替换为
Get-Item c:* -Exclude "Windows"Get-Item c:* -Exclude "Windows" | Get-ChildItem -Recurse | sort -descending -property length | select -first 10 name, Length 
售后响应及时
7×24小时客服热线
数据备份
更安全、更高效、更稳定
价格公道精准
项目经理精准报价不弄虚作假
合作无风险
重合同讲信誉,无效全额退款