打印作业:重新启动Print Spooler服务或重新安装打印机驱动程序

Microsoft.Windows.Server.6.2.PrintServer.PrintQueue.PrintJobStatus.System.RestartthePrintSpoolerserviceorreinstalltheprinterdriver.EventBased.UnitMonitor (UnitMonitor)

重新启动Print Spooler服务或重新安装打印机驱动程序。

Knowledge Base article:

摘要

重新启动Print Spooler服务或重新安装打印机驱动程序。

解决方案

若要解决此错误,请重试打印文档。如果上述操作失败,请按照本主题中的过程操作以完成下列任务:

删除打印作业并重新启动Print Spooler服务

若要删除失败的文档并重新启动Print Spooler服务,请使用此部分中所述的两个过程。

警告:重新启动Print Spooler会导致所有打印作业重启。在重新启动Print Spooler服务后,您可能需要重置一些打印机或关闭并重新打开这些打印机。如有可能,请在非营业时间或计划维护时间在活动的打印服务器上执行此过程。在执行此过程之前,请将所有打印机脱机并等待所有打印作业完成,或者暂停所有打印机并等待处于“活动”状态的所有打印作业完成。

若要删除失败的打印作业并重新启动Print Spooler服务,请执行以下操作:

注意:您也可以通过在提升的命令提示符窗口中的命令提示符下键入 net stop spooler 和 net start spooler 来执行此操作。(若要打开提升的命令提示符窗口,请单击“开始”,指向“所有程序”,再单击“附件”,右键单击“命令提示符”,然后单击“以管理员身份运行”。)

在某些情况下,当尝试启动Print Spooler服务时,您可能会收到错误 1068:“依赖服务或组无法启动”。此情况在Print Spooler服务依赖于其他未运行的服务时会出现。若要解决此问题,请使用以下过程。

若要验证或更改单个服务(依赖项)的“启动”设置,请执行以下操作:

重新安装打印机驱动程序

若要重新安装打印机驱动程序,请执行以下操作:

安装更新的打印机驱动程序

从打印机供应商处获取显示有“Designed for Windows”徽标的更新的打印机驱动程序,按照此打印机驱动程序附带的说明操作以将其安装到客户端计算机上,然后重新打印文档。

Element properties:

TargetMicrosoft.Windows.Server.6.2.PrintServer.Printer
Parent MonitorSystem.Health.AvailabilityState
CategoryStateCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.2SingleEventLog2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
打印作业状态警报
{0}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.Windows.Server.6.2.PrintServer.PrintQueue.PrintJobStatus.System.RestartthePrintSpoolerserviceorreinstalltheprinterdriver.EventBased.UnitMonitor" Accessibility="Public" Enabled="true" Target="Microsoft.Windows.Server.6.2.PrintServer.Printer" ParentMonitorID="SystemHealth!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.2SingleEventLog2StateMonitorType" ConfirmDelivery="true">
<Category>StateCollection</Category>
<AlertSettings AlertMessage="Microsoft.Windows.Server.6.2.PrintServer.PrintQueue.PrintJobStatus.System.RestartthePrintSpoolerserviceorreinstalltheprinterdriver.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/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>^(350)$</Pattern>
</RegExExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[2]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/Property[Type="Microsoft.Windows.Server.6.2.PrintServer.Printer"]/DeviceID$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</FirstExpression>
<SecondComputerName>$Target/Host/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>^(305|307|308|309|310|311|352)$</Pattern>
</RegExExpression>
</Expression>
</And>
</SecondExpression>
</Configuration>
</UnitMonitor>