Created
May 9, 2017 16:05
-
-
Save Dan1el42/31df7a8920176eedb2ed44772abe1ffe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$path = "C:\Testing\File.xml" | |
[Xml]$servicefactoryconfig = Get-Content -Path $path -Raw | |
$old = $servicefactoryconfig.SelectSingleNode("/factory/map/add[@key='Audit']") | |
$parent = $old.ParentNode | |
[void] $parent.RemoveChild($old) | |
$newNode = [Xml] @' | |
<add key="Audit" assembly="OpenContent.Platform.Core.dll" class="OpenContent.Core.Audit.Services.AuditASMXProxy"> | |
<parameter name="baseUrl" class="string" value="http://hostname/Website" /> | |
<parameter name="servicePath" class="string" value="Audit/AuditASMX.asmx" /> | |
<parameter name="timeout" class="int" value="120" /> | |
<parameter name="policy" class="string" value="AuditServicePolicy"/> | |
</add> | |
'@ | |
[void] $parent.AppendChild($servicefactoryconfig.ImportNode($newNode.add, $true)) | |
$servicefactoryconfig.save($path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment