在对应目录下通过powershell命令查看文件夹及文件大小,不需要管理员权限。
 以下为方式汇总:
方式1(推荐,免费下载使用,界面友好):
使用工具以下是一些第三方工具treesize_free
 https://www.jam-software.com/treesize_free
 

方式2(推荐,显示格式友好,不能显示隐藏文件夹的大小):
Get-ChildItem -Directory | ForEach-Object {
    $size = (Get-ChildItem $_.FullName -Recurse | Measure-Object -Property Length -Sum).Sum
    [PSCustomObject]@{
        Name = $_.Name
        Size = "{0:N2} MB" -f ($size / 1MB)
    }
} | Format-Table -AutoSize

方式3(备用,显示格式不友好,且不能显示隐藏文件夹的大小):
Get-ChildItem |
Format-Table  -AutoSize Mode, LastWriteTime, Name,
     @{ Label="Length(M)"; alignment="Left";
       Expression={
                    if($_.PSIsContainer -eq $True)
                        {(New-Object -com  Scripting.FileSystemObject).GetFolder( $_.FullName).Size/1024/1024}
                    else
                        {$_.Length/1024/1024}
                  }
     };




















