In Powershell I'm trying to replace the following:
<Name>RANDOMTEXT</Name>
</Member>
With
<Name>RANDOMTEXT</Name></Member>
I'm using the following code:
$content = [System.IO.File]::ReadAllText(<XMLFILE>).Replace("</Name>`n</Member>","</Name></Member>")
[System.IO.File]::WriteAllText(<NEWFILE>, $content)
The replace is not working.
Is there any way to do this?
.Replace("</Name>`r`n</Member>","</Name></Member>")