$root = Get-Location; $totalRoot = (Get-ChildItem . -Recurse -File -ErrorAction SilentlyContinue | Measure-Object Length -Sum).Sum; Write-Host "=== Racine: $($root.Path) [$("`{0:N2}`" -f ($totalRoot/1MB)) Mo] ===" -ForegroundColor Yellow; Get-ChildItem -Directory -Recurse -Depth 3 | ForEach-Object `{ $indent = ($_.FullName.Replace($root.Path, "").Split('\', [System.StringSplitOptions]::RemoveEmptyEntries).Count); $size = (Get-ChildItem $_.FullName -Recurse -File -ErrorAction SilentlyContinue | Measure-Object Length -Sum).Sum; Write-Host (" " * ($indent - 1) + "|-- " + $_.Name + " [" + "{0:N2}`" -f ($size / 1MB) + " Mo]") }