I am trying to find away to remove Duplicate words from a text file using Powershell
Name1 PC1234 PC1234 start Tue 2/17 6:53
Name2 PC5678 PC5678 start Tue 2/17 7:51
What I would like is
Name1 PC1234 start Tue 2/17 6:53
Name2 PC5678 start Tue 2/17 7:51
I have managed to get it working using the following but I would like to be able to open a .txt file remove the duplicate on all lines and right the content back to a new file.
$text= "Name1 PC1234 PC1234 start Tue 2/17 6:53"
Thank you of your help