Last active
August 10, 2016 04:38
-
-
Save Dan1el42/39766db12a3df808eabe0aff44039676 to your computer and use it in GitHub Desktop.
Post reference: https://powershell.org/forums/topic/simple-formatting-of-output/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$filePath = "C:\Temp" | |
$selectPropertyList = @( | |
@{n='FileName';e={$_.Name.ToUpper()}} | |
@{n='Length (MB)';e= {[System.Decimal]::Round($_.Length/1MB, 2)}} | |
) | |
$files = Get-ChildItem -Path $filePath -File -Recurse -Force | | |
Select-Object -Property $selectPropertyList | | |
Sort-Object -Property 'Length (MB)' -Descending | Out-GridView |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment