若要解決此問題,請確定已將所需的權限授與 Core 登錄機碼。如果問題持續發生,您可能需要在 TS 閘道伺服器上刪除並重新建立終端機服務資源授權原則 (TS RAP) 和終端機服務連線授權原則 (TS CAP)。
若要執行這些程序,您必須擁有本機 Administrators 群組的成員資格,或者您必須已經被委派適當的權限。
將所需的權限授與 Core 登錄機碼
注意:不正確地編輯登錄可能會對系統造成嚴重損害。在變更登錄前,您應先備份所有重要的資料。
若要將所需的權限授與 Core 登錄機碼:
在 TS 閘道伺服器上,依序按一下 [開始] 和 [執行]、輸入 regedit,然後按 ENTER。
瀏覽至 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\TerminalServerGateway\Config\Core 子機碼、以滑鼠右鍵按一下子機碼,然後按一下 [權限]。
在 [Core 的權限] 對話方塊的 [群組或使用者名稱] 底下,按一下 [SYSTEM]。在 [SYSTEM 的權限] 底下,如果不允許 [完全控制],請選取 [完全控制] 旁的 [允許] 核取方塊。
在相同對話方塊的 [群組或使用者名稱] 底下,按一下 [Administrators]。在 [Administrators 的權限] 底下,如果不允許 [完全控制],請選取 [完全控制] 旁的 [允許] 核取方塊。
按一下 [確定]。
再次嘗試匯出原則和組態設定。
如果匯出作業成功,本主題的其餘解決步驟便不適用。
如果將所需的權限授與 Core 登錄機碼無法解決此問題,請嘗試在 TS 閘道伺服器上刪除 TS RAP 和 TS CAP,然後重新建立它們。
在 TS 閘道伺服器上刪除並重新建立 TS RAP
附註:重新命名 rap.xml 並重新啟動 [TS 閘道管理員] 之後,系統將不會顯示任何 TS RAP,因此您必須重新設定 TS RAP 設定。
若要備份並刪除 rap.xml,然後開啟 [TS 閘道管理員] 主控台:
瀏覽至 %Windir%\System32\tsgateway\rap.xml,其中 %Windir% 是安裝作業系統的磁碟機。
將 rap.xml 重新命名為 rapbak.xml,藉以儲存 rap.xml 的備份複本。
刪除 rap.xml。
開啟 [TS 閘道管理員]。若要開啟 [TS 閘道管理員],請按一下 [開始]、依序指向 [系統管理工具] 和 [終端機服務],然後按一下 [TS 閘道管理員]。
視需要重新設定 TS RAP 設定。
再次嘗試匯出原則和組態設定。
在 TS 閘道伺服器上刪除並重新建立 TS CAP
如果備份並移除 Rap.xml 的目前複本以及重新建立 TS RAP 設定無法解決此問題,請嘗試將 IAS.xml 重新命名為 IASbak.xml,然後啟動 [TS 閘道管理員]。開啟此主控台將會建立新的 IAS.xml 檔案。
附註:重新命名 IAS.xml 並重新啟動 [TS 閘道管理員] 之後,系統將不會顯示任何 TS CAP,因此您必須重新設定 TS CAP 設定。
若要備份並刪除 IAS.xml,然後開啟 [TS 閘道管理員]:
瀏覽至 %Windir%\System32\ias\ias.xml,其中 %Windir% 是安裝作業系統的磁碟機。
將 IAS.xml 重新命名為 IASbak.xml,藉以儲存 IAS.xml 的備份複本。
刪除 IAS.xml。
開啟 [TS 閘道管理員]。若要開啟 [TS 閘道管理員],請按一下 [開始]、依序指向 [系統管理工具] 和 [終端機服務],然後按一下 [TS 閘道管理員]。
視需要重新設定 TS CAP 設定。
再次嘗試匯出原則和組態設定。
Target | Microsoft.Windows.Server.2008.TerminalServicesRole.Service.TSGateway | ||
Category | EventCollection | ||
Enabled | True | ||
Event_ID | 2004 | ||
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.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>