Need a help on a logic for which powershell script need to built. I have some files in txt which has " C:\Windows\system32;C:\Windows;C:\Windows\System32;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32" where C:\Windows\System32 is repeating 3 times which is not required. I need to replace the 3 entries as Single Entry. Can anyone help me out on the same.
I tried replace string but the logic is missing, If we want to replace A then the value of A will change to B or whatever. But here I need to replace the 3 entries as Single entry.
Thanks in advance if someone helpme out on this.
[attachment file=“Duplicate Values.txt”]