Im sure there are other ways to do this, but im trying to learn and trying to see how I can convert this length output to GB format
dir $env:USERPROFILE -Recurse -File | sort-object -property length | select -last 10
Thanks alot!
Im sure there are other ways to do this, but im trying to learn and trying to see how I can convert this length output to GB format
dir $env:USERPROFILE -Recurse -File | sort-object -property length | select -last 10
Thanks alot!
Unfortunately there is no easy -h like in Linux. You could do it like this:
select *,@{n='Length (GB)';e={$_.Length / 1GB}} -exclude length -last 10
Basically you select every property (*) add a calculated property to the output @{n='Length (GB)';e={$_.Length / 1GB}} and exclude the normal length (optional)