# encoding: ascii
# api: powershell
# title: Get-FolderSize
# description: A Little Script for $PROFILE File to Add Support for Get-FolderSize.
# version: 0.1
# type: function
# author: Piere Woehl
# license: CC0
# function: Get-FolderSize
# x-poshcode-id: 5647
# x-archived: 2016-09-07T04:24:22
# x-published: 2016-12-15T19:54:00
#
# Show in MB and 2 Digits behind “.”
#
function Get-FolderSize {
$location = $args[0]
Write-Host "Directory to Scan:"$location
$value = "{0:N2}" -f ((Get-ChildItem -recurse $location | Measure-Object -property length -sum).Sum / 1MB)
Write-Host "Used Storage for Directory:"$value" MB"
}