確定已將所需的權限授與 Core 登錄機碼,如有需要則刪除並重新建立 TS RAP 和 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 CAP,然後重新建立它們。

在 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 RAP 和 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>