Powershell File – Ordner Größe auslesen und Export
Die Ordner Größe bestimmen
$rootPath = „D:\Data\“
$colItems1 = Get-ChildItem $rootPath
foreach ($i in $colItems1)
{
$colItems = (Get-ChildItem -recurse „$rootPath\$i“ | Measure-Object -property length -sum)
„{0:N2}“ -f ($colItems.sum / 1MB) + “ MB,$i“
„{0:N2}“ -f ($colItems.sum / 1MB) + “ MB,$i“ >>C:\Temp\ErgebnisDerZählung.txt
}



