AD DS 打印机发布:在列出、删除或更新打印机时,无法写入 AD DS

Microsoft.Windows.Server.10.0.PrintServer.PrintQueue.ADDSPrinterPublishing.System.None.EventBased.UnitMonitor (UnitMonitor)

在列出、删除或更新打印机时,无法写入 AD DS。

Knowledge Base article:

摘要

在列出、删除或更新打印机时,无法写入 AD DS。

配置

监视器采用单个配置参数,可控制启用“Microsoft-Windows-PrintService/Admin 和 Microsoft-Windows-PrintService/Operational”事件日志时是否应监视“打印后台处理程序”并重启事件日志服务。默认情况下,仅当启用“Microsoft-Windows-PrintService/Admin 和 Microsoft-Windows-PrintService/Operational”日志记录时才监视打印后台处理程序监视器。

解决方法

若要解决与域控制器的连接问题,请执行以下操作:

Element properties:

TargetMicrosoft.Windows.Server.10.0.PrintServer.Printer
Parent MonitorSystem.Health.AvailabilityState
CategoryStateCollection
EnabledFalse
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.2SingleEventLog2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
AD DS 打印机发布警报
{0}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.Windows.Server.10.0.PrintServer.PrintQueue.ADDSPrinterPublishing.System.None.EventBased.UnitMonitor" Accessibility="Public" Enabled="false" Target="Microsoft.Windows.Server.10.0.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.10.0.PrintServer.PrintQueue.ADDSPrinterPublishing.System.None.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>^(322|323|325|326|327|333|335)$</Pattern>
</RegExExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[1]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/Property[Type="Microsoft.Windows.Server.10.0.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>^(332|334|336|338|342|343|344|345|346)$</Pattern>
</RegExExpression>
</Expression>
</And>
</SecondExpression>
</Configuration>
</UnitMonitor>