Print Spooler: Restart the Print Spooler service

Microsoft.Windows.Server.10.0.PrintServer.PrintSpoolerService.PrintSpoolerStatus.System.RestartthePrintSpoolerservice.EventBased.UnitMonitor (UnitMonitor)

Restart the Print Spooler service.

Knowledge Base article:

Summary

Restart the Print Spooler service.

Configuration

The monitor takes a single configuration parameter that controls whether the “Print Spooler” should be monitored when enable the “Microsoft-Windows-PrintService/Admin and Microsoft-Windows-PrintService/Operational” Event logs and restart event log service. By default, the “Print Spooler” Monitor will be monitored only If the “Microsoft-Windows-PrintService/Admin and Microsoft-Windows-PrintService/Operational" Event logs are Enabled.

Resolutions

Possible resolutions include:

In the Administrative Tools folder, open the Services snap-in.Locate the Print Spooler service in the list of services, and then confirm that its status is Started. If its status is not Started, select the service and then click Start on the Action menu. Note: You can also do this from an elevated Command Prompt window by typing the following command: net stop spooler and net start spooler

In some instances, you might receive Error 1068 ? \The dependency service or group failed to start\ ? when attempting to start the Print Spooler service. This can happen if the Print Spooler service relies on other services that are not running. To resolve this issue, use the following procedure:

In the Services snap-in, right-click Print Spooler and then click Properties. Click the Dependencies tab. The first box lists all of the system services that must be running for Print Spooler service to start. These are the dependencies. Make a note of each service, click OK, and then start each service that the print spooler depends on, if the service is not already started. If a particular service was not already started, right-click it, click Properties, and then confirm that the Startup type is Automatic.

Element properties:

TargetMicrosoft.Windows.Server.10.0.PrintServerRole
Parent MonitorSystem.Health.AvailabilityState
CategoryStateCollection
EnabledFalse
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.2SingleEventLog2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Print Spooler Status Alert By Restart the Print Spooler service
{0}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.Windows.Server.10.0.PrintServer.PrintSpoolerService.PrintSpoolerStatus.System.RestartthePrintSpoolerservice.EventBased.UnitMonitor" Accessibility="Public" Enabled="false" Target="Microsoft.Windows.Server.10.0.PrintServerRole" ParentMonitorID="SystemHealth!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.2SingleEventLog2StateMonitorType" ConfirmDelivery="true">
<Category>StateCollection</Category>
<AlertSettings AlertMessage="Microsoft.Windows.Server.10.0.PrintServer.PrintSpoolerService.PrintSpoolerStatus.System.RestartthePrintSpoolerservice.EventBased.UnitMonitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/EventDescription$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Negative" MonitorTypeStateID="FirstEventRaised" HealthState="Error"/>
<OperationalState ID="Success" MonitorTypeStateID="SecondEventRaised" HealthState="Success"/>
</OperationalStates>
<Configuration>
<FirstComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</FirstComputerName>
<FirstLogName>Microsoft-Windows-PrintService/Admin</FirstLogName>
<FirstExpression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-Windows-PrintService</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>^(373)$</Pattern>
</RegExExpression>
</Expression>
</And>
</FirstExpression>
<SecondComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</SecondComputerName>
<SecondLogName>Microsoft-Windows-PrintService/Operational</SecondLogName>
<SecondExpression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-Windows-PrintService</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>^(312|313)$</Pattern>
</RegExExpression>
</Expression>
</And>
</SecondExpression>
</Configuration>
</UnitMonitor>