I want to scan the size of the users HomeDirs in our HomeDirs folder, sort all folders by size and write the 3 biggest folders' name size in a textfile.

Example:
Scan all subfolders of: \\Myserver\HomeDirs$
Sort them by size, biggest on top
Write name and size of the 3 biggest folders to HomeSize.txt

I've been trying some things with GetFolderSize but I'm having some trouble to make it all work. Any help with an axample script would be realy appreciated !