Skip to content

Instantly share code, notes, and snippets.

@jca02266
Last active November 23, 2021 12:58
Show Gist options
  • Save jca02266/a1e1691bf44c92d213c91b0ed3681014 to your computer and use it in GitHub Desktop.
Save jca02266/a1e1691bf44c92d213c91b0ed3681014 to your computer and use it in GitHub Desktop.
Get-Item * | % {
$folder = $_
Write-Warning $folder
Get-ChildItem $folder -Recurse | Measure-Object -Sum Length | Select-Object @{Name="Folder"; E={$folder.FullName}},Count,Sum
# [GC]::Collect()
} | Sort-Object Sum -Desc | Format-Table -AutoSize
@jca02266
Copy link
Author

jca02266 commented Nov 23, 2021

試したバージョン

PS> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.1151
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1151
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment