Listar archivos segun tamaño en PowerShell - complex

PHOTO EMBED

Mon Jun 03 2024 14:45:08 GMT+0000 (Coordinated Universal Time)

Saved by @RobertoSilvaZ #powershell #windows11 #system #performance

Get-ChildItem -Path C:\ -Recurse -File -ErrorAction SilentlyContinue |
    Where-Object { $_.Length -gt 100MB } |
    Sort-Object Length -Descending |
    Select-Object @{Name='FullName'; Expression={$_.FullName}},
                  @{Name='Size (MB)'; Expression={[math]::Round($_.Length / 1MB, 2)}} |
    Format-Table -AutoSize

FullName                                           Size (MB)
--------                                           ----------
C:\some\path\to\largefile1.ext                      123.45
C:\another\path\to\largefile2.ext                   110.98
content_copyCOPY