Скрипт вычисляет размер подпапок
Работает в Powershell 2.0
#ScriptVersion = 0.1 # PSVersion = 2.0 $filePath = 'C:\siebel' cd $filePath $subdirs = get-childitem | where {$_.PSIsContainer} $table = foreach ($dir in $subdirs) { new-object psobject =Property @{ Name = $dir.Name Length = "{0} MB" -f ((Get-ChildItem -Path $dir.Name -Recurse | Measure-Object _property Length -Sum -ErrorAction Stop).Sum / 1MB) } } $table | Format-Table
Скрипт перед вычислением переходит в указанное расположение