Skip to content

Commit d364655

Browse files
committed
Update units in Get-FolderSize func.
1 parent fd1edde commit d364655

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Functions/Get-FolderSize.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ param (
7272

7373
[Parameter()]
7474
[ValidateSet(
75-
"KB","MB","GB"
75+
"KB","MB","GB", "TB"
7676
)]
7777
$Unit = "MB"
7878
)
@@ -84,7 +84,7 @@ process {
8484
if ($item.PSIsContainer) {
8585
$measure = Get-ChildItem $pathValue -Recurse -Force -ErrorAction SilentlyContinue |
8686
Measure-Object -Property Length -Sum
87-
$sum = [Math]::Round( ($measure.Sum / "1$Unit"), 5)
87+
$sum = [Math]::Round( ($measure.Sum / "1$Unit"), 2 )
8888
[PSCustomObject]@{
8989
"Path" = $item.FullName
9090
"Size($Unit)" = $sum

0 commit comments

Comments
 (0)