jjzjj

httpGetEnabled

全部标签

xml - 如果使用 PowerShell 不存在,如何添加属性?

在web.config文件中,如果它们不存在,我必须启用httpGetEnabled和httpsGetEnabled属性。$Path="c:\web.config"$XPath="/configuration/system.serviceModel/behaviors/serviceBehaviors/behavior"if(Select-XML-Path$Path-Xpath$XPath){"Pathavailable"$attributePath=$Xpath+="/serviceMetadata""Attributepathis$attributePath"If(Get-XMLA