Remove node from XML file

20/03/2012 09:58

#write to owstimer.exe.config - removing appSettings node

$FilePath="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\OWSTIMER.EXE.CONFIG"
$xml=[xml](get-content $FilePath)
$Node=$xml.SelectSingleNode("/configuration/appSettings")
$xml["configuration"].RemoveChild($Node)

$xml.Save($FilePath)