I have an XML file and need to change the value to False. Is there a way to do this with powershell?
<setting name="RecordChatHistory">
<value>True</value>
</setting>
I have an XML file and need to change the value to False. Is there a way to do this with powershell?
<setting name="RecordChatHistory">
<value>True</value>
</setting>
You can do it this way.
Loading xml
$xml = [xml](Get-Content -Path C:\path\to\file.xml)
Replacing string value True to False
$xml.setting.value = 'False'
Using the Save() method
$xml.Save("C:\path\to\file.xml")