若要解決此問題,請確定已將正確的權限授與 LogEvents 登錄機碼。如果這樣做無法解決此問題,請確定已啟動遠端登錄服務。
若要執行這些程序,您必須擁有本機 Administrators 群組的成員資格,或者您必須已經被委派適當的權限。
將所需的權限授與 LogEvents 登錄機碼
注意:不正確地編輯登錄可能會對系統造成嚴重損害。在變更登錄前,您應先備份所有重要的資料。
若要將所需的權限授與 LogEvents 登錄機碼:
在 TS 閘道伺服器上,依序按一下 [開始] 和 [執行]、輸入 regedit,然後按 ENTER。
瀏覽至 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\TerminalServerGateway\Config\Core\LogEvents 子機碼、以滑鼠右鍵按一下子機碼,然後按一下 [權限]。
在 [LogEvents 的權限] 對話方塊的 [群組或使用者名稱] 底下,按一下 [SYSTEM]。在 [SYSTEM 的權限] 底下,如果不允許 [完全控制],請選取 [完全控制] 旁的 [允許] 核取方塊。
在相同對話方塊的 [群組或使用者名稱] 底下,按一下 [Administrators]。在 [Administrators 的權限] 底下,如果不允許 [完全控制],請選取 [完全控制] 旁的 [允許] 核取方塊。
按一下 [確定]。
如果問題持續發生,請判斷是否已啟動遠端登錄服務。如果沒有,請啟動它。
判斷是否已啟動遠端登錄服務
如果您啟用或停用了某個服務,而且在啟動電腦時遇到問題,應該可以在「安全模式」中啟動電腦。然後,您就可以變更服務設定或還原預設設定。
如果您停止、啟動或重新啟動了某個服務,任何相依的服務也會受到影響。
若要判斷是否已啟動遠端登錄服務:
按一下 [開始]、指向 [系統管理工具],然後按一下 [服務]。
在 [服務] 嵌入式管理單元中,尋找 [遠端登錄],然後確認 [已啟動] 顯示在 [狀態] 欄位中。
如果其狀態不是 [已啟動],請以滑鼠右鍵按一下 [遠端登錄],然後按一下 [啟動]。
如果單獨啟動此服務的嘗試失敗,請重新啟動電腦。這樣做會強制所有相關和相依的服務重新啟動。
如果您想要讓此服務永遠在伺服器重新啟動之後自動啟動,請以滑鼠右鍵按一下 [遠端登錄]、按一下 [內容],然後在 [啟動類型] 中,選取 [自動]。
Target | Microsoft.Windows.Server.2008.TerminalServicesRole.Service.TSGateway | ||
Category | EventCollection | ||
Enabled | True | ||
Event Source | Microsoft-Windows-TerminalServices-Gateway | ||
Alert Generate | True | ||
Alert Severity | Error | ||
Alert Priority | Normal | ||
Remotable | True | ||
Alert Message |
| ||
Event Log | Microsoft-Windows-TerminalServices-Gateway/Admin |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | Microsoft.Windows.EventProvider | Default |
Alert | WriteAction | System.Health.GenerateAlert | Default |
<Rule ID="Microsoft.Windows.Server.2008.TerminalServicesRole.Service.TSGateway.EventCollection.505.507" 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>
<RegExExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>^(505|507)$</Pattern>
</RegExExpression>
</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.505.507.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>