确保已向 Core 注册表项授予必需的权限,如果需要,请删除并重新创建 TS CAP 和 TS RAP

Microsoft.Windows.Server.2008.TerminalServicesRole.Service.TSGateway.EventCollection.2004 (Rule)

Knowledge Base article:

解决方法

若要解决此问题,请确保已向 Core 注册表项授予必需的权限。如果此问题仍然存在,您可能必须在 TS 网关服务器上删除并重新创建终端服务资源授权策略 (TS RAP) 和终端服务连接授权策略 (TS CAP)。

若要执行这些过程,您必须拥有本地 Administrators 组成员身份,或者您必须被委派了适当的权限。

向 Core 注册表项授予必需的权限

警告:注册表编辑不当可能会严重损坏您的系统。在更改注册表之前,您应备份任何有价值的数据。

若要向 Core 注册表项授予必需的权限,请执行以下操作:

如果向 Core 注册表项授予必需的权限不能解决此问题,请尝试在 TS 网关服务器上删除并重新创建 TS RAP 和 TS RAP。

在 TS 网关服务器上删除并重新创建 TS RAP

注意:在重命名 rap.xml 并重新启动 TS 网关管理器之后,将不会显示任何 TS RAP,因此您必须重新配置 TS RAP 设置。

若要备份并删除 rap.xml,然后打开 TS 网关管理器控制台,请执行以下操作:

在 TS 网关服务器上删除并重新创建 TS CAP

如果通过备份并删除 Rap.xml 的当前副本,然后重新创建 TS RAP 设置的方法不能解决此问题,请尝试将 IAS.xml 重命名为 IASbak.xml,然后启动 TS 网关管理器。打开控制台将创建新的 IAS.xml 文件。

注意:在重命名 IAS.xml 并重新启动 TS 网关管理器之后,将不会显示任何 TS CAP,因此您必须重新配置 TS CAP 设置。

若要备份并删除 IAS.xml,然后打开 TS 网关管理器,请执行以下操作:

Element properties:

TargetMicrosoft.Windows.Server.2008.TerminalServicesRole.Service.TSGateway
CategoryEventCollection
EnabledTrue
Event_ID2004
Event SourceMicrosoft-Windows-TerminalServices-Gateway
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
确保已向 Core 注册表项授予必需的权限,如果需要,请删除并重新创建 TS CAP 和 TS RAP
{0}
Event LogMicrosoft-Windows-TerminalServices-Gateway/Admin

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.EventProvider Default
Alert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.Windows.Server.2008.TerminalServicesRole.Service.TSGateway.EventCollection.2004" Enabled="onStandardMonitoring" Target="Microsoft.Windows.Server.2008.TerminalServicesRole.Service.TSGateway" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>EventCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.EventProvider">
<ComputerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>Microsoft-Windows-TerminalServices-Gateway/Admin</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">2004</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-Windows-TerminalServices-Gateway</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="Alert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>2</Severity>
<AlertName/>
<AlertDescription/>
<AlertOwner/>
<AlertMessageId>$MPElement[Name="Microsoft.Windows.Server.2008.TerminalServicesRole.Service.TSGateway.EventCollection.2004.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue>$Data/LoggingComputer$</SuppressionValue>
</Suppression>
<Custom1/>
<Custom2/>
<Custom3/>
<Custom4/>
<Custom5/>
<Custom6/>
<Custom7/>
<Custom8/>
<Custom9/>
<Custom10/>
</WriteAction>
</WriteActions>
</Rule>