Answers:
这将按目录降序列出所有可用驱动器上的所有ZIP文件:
get-psdrive -p "FileSystem" `
| % {write-host -f Green "Searching " $_.Root;get-childitem $_.Root -include *.ZIP -r `
| sort-object Length -descending}
或搜索驱动器/共享的指定列表(例如C:,D:和\ SERVER1 \ SHARE1 ...)
$paths="C:\","D:\","\\SERVER1\SHARE1" `
| % {write-host -f Green "Searching " $_;get-childitem $_ -include *.ZIP -r `
| sort-object Length -descending}