Format text file using poweshell : Picup the text file : C:\file.txt

    VersionID|VersionNumber|UpgradeDate|Comments
    ---------|-------------|-----------|--------
    1156|3.3.0|2017-01-04 23:13:04.687|3.3 comment


I want to Remove ---------| and create output in a Table format 

    VersionID|VersionNumber|UpgradeDate            |Comments
    1156     |3.3.0        |2017-01-04 23:13:04.687|3.3 comment

And Write the output in a new file 
C:\output.txt



