删除XML属性

时间:2019-09-10 15:58:42

标签: xml powershell

我需要一些有关PowerShell代码的帮助,这些代码必须从子行中删除属性类型。这行是<loginhibit onsuccess="true" />,我只需要擦除onsuccess="true"

elseif (($StageNode.GetElementsByTagName("loginhibit").Count -eq 1) -and ($StageNode.GetAttribute("onsuccess") -eq "true") -and ($pSetLog -eq 0)) {
$StageNode.RemoveAttribute("onsuccess")
$ActionNeeded = $false}

0 个答案:

没有答案