I was looking for a way to show folder sizes on various folders and servers without using third party tools when I found thisexcellent piece of code
https://community.spiceworks.com/scripts/show/1738-get-foldersizes
Using this everything works great except the sort. To start the script I use
.\Get-FolderSizes.ps1 d:\path -reportpath c:\temp -Sort size -Descending
When it outputs the html everything is as expected except the sorted size column
What I get for the size is this column This is with sort by size and descending it doesn't seem to account for the MB or GB tag or where the decimal point is
If I change the code to only return MB I get this for the sizes. This is the same directory but different order

All I want is a quick report of a directory with the folder sizes listed largest to smallest. Is this just Windows or am I just...