Web binding should not enable http

Microsoft.Windows.Server.NAP.WebBindingMonitor (UnitMonitor)

This monitor ensures that this server does not allow HTTP (unsecured) connections

Element properties:

TargetMicrosoft.Windows.Server.NAP.HRA
Parent MonitorSystem.Health.ConfigurationState
CategoryCustom
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.Server.NAP.PowershellScriptMonitor
RemotableTrue
AccessibilityPublic
Alert Message
IIS web binding enables unsecured HTTP transactions
See the alert context for details.
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.Windows.Server.NAP.WebBindingMonitor" Accessibility="Public" Enabled="true" Target="Microsoft.Windows.Server.NAP.HRA" ParentMonitorID="Health!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="Microsoft.Windows.Server.NAP.PowershellScriptMonitor" ConfirmDelivery="true">
<Category>Custom</Category>
<AlertSettings AlertMessage="Microsoft.Windows.Server.NAP.WebBindingMonitor_AlertMessageResourceID">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
</AlertSettings>
<OperationalStates>
<OperationalState ID="UIGeneratedOpStateId8618f1f47497489186b347742d66c850" MonitorTypeStateID="Healthy" HealthState="Success"/>
<OperationalState ID="UIGeneratedOpStateId1eb2160f20aa4fd6adabddec488262e9" MonitorTypeStateID="Unhealthy" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<ErrorExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='HTTPBindingsExist']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">true</Value>
</ValueExpression>
</SimpleExpression>
</ErrorExpression>
<SuccessExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='HTTPBindingsExist']</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="String">true</Value>
</ValueExpression>
</SimpleExpression>
</SuccessExpression>
<TimeoutSeconds>300</TimeoutSeconds>
<IntervalSeconds>14400</IntervalSeconds>
<ScriptName>IISWebBindingMonitor.ps1</ScriptName>
<ScriptBody><Script>
$culture = [System.Globalization.CultureInfo]&#x201C;en-US&#x201D;
[System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture
[System.Threading.Thread]::CurrentThread.CurrentCulture = $culture

$api = new-object -comObject 'MOM.ScriptAPI'
$propertyBag = $api.CreatePropertyBag()

import-module webadministration
$col = @(get-webbinding -name "Default Web Site" -protocol http)
if ($col.length -eq 0)
{
$api.LogScriptEvent("IISWebBindingMonitor.ps1", 0, 0, "web binding does not contain HTTP (desired configuration)")
$propertyBag.AddValue("HTTPBindingsExist", "false")
$api.Return($propertyBag)
}
else
{
$api.LogScriptEvent("IISWebBindingMonitor.ps1", 0, 0, "web binding contains HTTP (undesired configuration)")
$propertyBag.AddValue("HTTPBindingsExist", "true")
$api.Return($propertyBag)
}
</Script></ScriptBody>
</Configuration>
</UnitMonitor>