mirror of
https://github.com/sstent/Scripts.git
synced 2026-01-26 15:12:27 +00:00
added scripts and SUPERMICRO
This commit is contained in:
11
foldersize.ps1
Normal file
11
foldersize.ps1
Normal file
@@ -0,0 +1,11 @@
|
||||
$startFolder = "C:\"
|
||||
|
||||
$colItems = (Get-ChildItem $startFolder | Measure-Object -property length -sum)
|
||||
"$startFolder -- " + "{0:N2}" -f ($colItems.sum / 1MB) + " MB"
|
||||
|
||||
$colItems = (Get-ChildItem $startFolder -recurse | Where-Object {$_.PSIsContainer -eq $True} | Sort-Object)
|
||||
foreach ($i in $colItems)
|
||||
{
|
||||
$subFolderItems = (Get-ChildItem $i.FullName | Measure-Object -property length -sum)
|
||||
$i.FullName + " -- " + "{0:N2}" -f ($subFolderItems.sum / 1MB) + " MB"
|
||||
}
|
||||
Reference in New Issue
Block a user