It is usually fairly easy to convert a VBA macro to powershell. If you could do the following:
Turn on Macro-Recording in Excel, Go through the steps to create your Tree view and then save the macro.
Next go to your macro editor, open the new macro, copy and past it here and I'll give it a look.
OldDog