your above code had garbled text because you didn't set the console like Gintaras suggested
this line was the difference between proper output and garbled text
[Console]::OutputEncoding=[System.Text.Encoding]::UTF8
this line was the difference between proper output and garbled text
[Console]::OutputEncoding=[System.Text.Encoding]::UTF8