I am using the get-content and sort-object -unique cdmlets to combine text log files via:
(Get-Content .\*ninite.txt) | sort -unique | Set-Contentinstallreport.txt
Example text files are uploaded here. The unique switch removes duplicates but it also rearranges the text lines. I would like to have the single OK string be at the top of the lest in the final exported text file. Do I need to save each line to a hash and rearrange that way first?