I have an XML file with the below content
<?xml version="1.0" encoding="utf-8"?>
<Topology>
<SERVER1 desc="name of server1"></ICONIS_ONLINE_SERVER1>
<SERVER2 desc="name of server2">PROJECT</SSCOFFLINE_SERVER1>
</Topology>
I have the following powershell script to get the contents, modify the contents and save the content of XML file.
#This will replace the values on the topology file and saves it
$xmldata =[XML](Get-Content \\10.10.115.16\c$\Deployment\Config.xml)
$xmldata. Topology.SERVER1.InnerText = 'Mydomain'
$xmldata. Save((Resolve-Path \\10.10.115.16\c$\Deployment\Config.xml). Path
The above powershell script will replace the contents and saves it. However, it is not allowing to save it. It shows the error as
Exception calling "Save" with "1" argument(s): "The given path's format is not supported."
Any assistance is appreciated.