If you want to remove the
$ContentPath = "D:\Content"
$dir = Get-ChildItem $Contentpath -recurse -include *.osd
foreach($osdfile in $dir)
{
[xml] $xmldoc = New-Object XML
$xmlDoc.Load($osdfile)
$nodes = $xmlDoc.SelectNodes("/SOFTPKG/IMPLEMENTATION/OS")
$root = $xmlDoc.SOFTPKG.Implementation
foreach ($node in $root.OS)
{
[void]$root.RemoveChild($node)
}
$xmldoc.save($osdfile)
Related posts:
