Skip to content

Instantly share code, notes, and snippets.

View yeahservice's full-sized avatar

Dominik Augustin yeahservice

View GitHub Profile
yeahservice / du.ps1
Last active December 21, 2019 22:47
Windows Powershell script for displaying directory sizes. Just copy it into the root directory and execute the script with Powershell.
Get-ChildItem -Directory | ForEach-Object {
cd $_
switch((ls -r|measure -s Length).Sum) {
{$_ -gt 1GB} {
'{0:0.0} GB' -f ($_/1GB)
{$_ -gt 1MB} {
'{0:0.0} MB' -f ($_/1MB)