Отслеживает наличие правильной установленной версии службы удаленного управления Windows
Установленная на узле виртуальных машин версия службы WinRM несовместима с текущей версией System Center Virtual Machine Manager (VMM).
Из-за обновления Virtual Machine Manager требуется обновить службу WinRM на узле.
Обновите службу WinRM на узле до версии 6.0.6001.18000 или более поздней.
Target | Microsoft.SystemCenter.VirtualMachineManager.2016.HyperVHost | ||
Parent Monitor | System.Health.AvailabilityState | ||
Category | AvailabilityHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | Error | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.SystemCenter.VirtualMachineManager.2016.TimedPowershell.TwoStatesMonitorType | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.SystemCenter.VirtualMachineManager.2016.WinRMVersionMonitor" Accessibility="Public" Target="VMM2016Discovery!Microsoft.SystemCenter.VirtualMachineManager.2016.HyperVHost" ParentMonitorID="SystemHealth!System.Health.AvailabilityState" Remotable="true" TypeID="Microsoft.SystemCenter.VirtualMachineManager.2016.TimedPowershell.TwoStatesMonitorType">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.VirtualMachineManager.2016.WinRMVersionMonitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="InCorrectVersionWinRMInstalled" MonitorTypeStateID="Error" HealthState="Error"/>
<OperationalState ID="CorrectVersionWinRMInstalled" MonitorTypeStateID="Success" HealthState="Success"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>7200</IntervalSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
<ScriptName>CheckWinRMVersionMonitorScript.ps1</ScriptName>
<ScriptBody> # Copyright (c) Microsoft Corporation. All rights reserved.
# Powershell source code
# CheckWinRMVersionMonitorScript.ps1
# This Script is used to get the version of %Windir%\System32\wsmsvc.dll
# If the version is greater than "6.0.6001.18000",
# then it returns "Healthy", otherwise returns "Unhealthy"
$momAPI = new-object -comObject MOM.ScriptAPI
$error.Clear();
$oBag = $momAPI.CreatePropertyBag();
$dll = Get-Item $env:windir\System32\wsmsvc.dll
if($dll -ne $null){
# Check that version is 5.x.x.x (WS 2003) or less than 6.0.6001.18000
if(($dll.VersionInfo.ProductMajorPart -lt 6) -or (($dll.VersionInfo.ProductMajorPart -eq 6) -and ($dll.VersionInfo.ProductMinorPart -eq 0) -and (($dll.VersionInfo.ProductBuildPart -lt 6001) -or (($dll.ProductBuildPart -eq 6001) -and ($dll.VersionInfo.ProductPrivatePart -le 18000)))))
{
$oBag.AddValue("Correct Version WinRM Installed", "UnHealthy");
}
else
{
$oBag.AddValue("Correct Version WinRM Installed", "Healthy");
}
}
else {
$oBag.AddValue("Correct Version WinRM Installed", "UnHealthy");
}
$oBag; </ScriptBody>
<Parameters/>
<ErrorExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='Correct Version WinRM Installed']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">UnHealthy</Value>
</ValueExpression>
</SimpleExpression>
</ErrorExpression>
<SuccessExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='Correct Version WinRM Installed']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Healthy</Value>
</ValueExpression>
</SimpleExpression>
</SuccessExpression>
</Configuration>
</UnitMonitor>