

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用 EC2Rescue GUI 來疑難排解受損的 Windows 執行個體
<a name="ec2rw-gui"></a>

EC2Rescue for Windows Server 可對**離線執行個體**執行下列分析：


| 選項 | 描述 | 
| --- | --- | 
| 診斷與救援 | EC2Rescue for Windows Server 可以偵測並解決下列服務設定的問題： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/AWSEC2/latest/UserGuide/ec2rw-gui.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/AWSEC2/latest/UserGuide/ec2rw-gui.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/AWSEC2/latest/UserGuide/ec2rw-gui.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/AWSEC2/latest/UserGuide/ec2rw-gui.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/AWSEC2/latest/UserGuide/ec2rw-gui.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/AWSEC2/latest/UserGuide/ec2rw-gui.html) | 
| 還原 | 執行下列動作之一： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/AWSEC2/latest/UserGuide/ec2rw-gui.html) | 
| 擷取日誌 | 允許您擷取執行個體的日誌用於分析。 | 

EC2Rescue for Windows Server 可從**作用中和離線的執行個體**收集下列資料︰


| 項目 | 描述 | 
| --- | --- | 
| 事件日誌 | 收集應用程式、系統和 EC2Config 事件日誌。 | 
| 登錄 | 收集 SYSTEM 和 SOFTWARE Hive。 | 
| Windows Update 日誌 | 收集 Windows Update 產生的日誌檔案。 在 Windows Server 2016 年及更新版本中，日誌會以 Event Tracing for Windows (ETW) 格式收集。 | 
| Sysprep 日誌 | 收集 Windows 系統準備工具產生的日誌檔案。 | 
| 驅動程式設定日誌 | 收集 Windows SetupAPI 日誌 (setupapi.dev.log 和 setupapi.setup.log)。 | 
| 開機組態 | 收集 HKEY\$1LOCAL\$1MACHINE\$1BCD00000000 Hive。 | 
| 記憶體傾印 | 收集執行個體上所有的記憶體傾印檔案。 | 
| EC2Config 檔案 | 收集 EC2Config 服務產生的日誌檔案。 | 
| EC2Launch 檔案 | 收集 EC2Launch 指令碼產生的日誌檔案。 | 
| SSM Agent 檔案 | 收集 SSM Agent 和修補程式管理員日誌產生的日誌檔案。 | 
| EC2 ElasticGPUs 檔案 | 收集與 Elastic GPU 相關的事件日誌。 | 
| ECS | 收集與 Amazon ECS 相關的日誌。 | 
| CloudEndure | 收集與 CloudEndure 代理程式相關的日誌檔案。 | 
| AWS MGN 或 DRS 日誌檔案的複寫代理程式 | 收集與 AWS Application Migration Service 或 相關的日誌檔案 AWS 彈性災難復原。 | 

EC2Rescue for Windows Server 可從**作用中執行個體**收集下列其他資料：


| 項目 | 描述 | 
| --- | --- | 
| 系統資訊 | 收集 MSInfo32。 | 
| 群組政策結果 | 收集 Group Policy (群組政策) 報告。 | 

## 分析離線的執行個體
<a name="ec2rescue-offline"></a>

**Offline Instance (離線的執行個體)** 選項對偵錯 Windows 執行個體的開機問題很有幫助。

**在離線的執行個體上執行動作**

1. 從工作中的 Windows Server 執行個體，下載 [EC2Rescue for Windows Server](https://s3.amazonaws.com/ec2rescue/windows/EC2Rescue_latest.zip?x-download-source=docs) 工具並解壓縮檔案。

   您可以執行下列 PowerShell 命令來下載 EC2Rescue，而不需要變更 Internet Explorer 增強式安全性設定 (ESC)：

   ```
   Invoke-WebRequest https://s3.amazonaws.com/ec2rescue/windows/EC2Rescue_latest.zip -OutFile $env:USERPROFILE\Desktop\EC2Rescue_latest.zip
   ```

   此命令會將 EC2Rescue .zip 檔案下載到目前登入使用者的桌面。
**注意**  
如果您在下載檔案時收到錯誤，且您使用 Windows Server 2016 或更早版本，則 PowerShell 終端機可能需要啟用 TLS 1.2。您可以使用下列命令為目前的 PowerShell 工作階段啟用 TLS 1.2，然後再試一次：  

   ```
   [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
   ```

1. 如果故障的執行個體尚未停止，請停止它。

1. 從故障的執行個體分離 EBS 根磁碟區，再將此磁碟區連接到已安裝EC2Rescue for Windows Server 的工作中 Windows 執行個體。

1. 在工作中的執行個體上執行 EC2Rescue for Windows Server 工具並選擇 **Offline Instance (離線的執行個體)**。

1. 選取新掛載磁碟區上的磁碟，然後選擇 **Next (下一步)**。

1. 確認選取磁碟，然後選擇 **Yes (是)**。

1. 選擇要執行的離線執行個體選項並選擇 **Next (下一步)**。

EC2Rescue for Windows Server 工具會掃描磁碟區，並根據選取的日誌檔案收集故障診斷資訊。

## 收集作用中執行個體的資料
<a name="ec2rescue-active"></a>

您可收集作用中執行個體的日誌和其他資料。

**收集作用中執行個體的資料**

1. 連接至 Windows 執行個體。

1. 將 [EC2Rescue for Windows Server](https://s3.amazonaws.com/ec2rescue/windows/EC2Rescue_latest.zip?x-download-source=docs) 工具下載到您的 Windows 執行個體並解壓縮檔案。

   您可以執行下列 PowerShell 命令來下載 EC2Rescue，而不需要變更 Internet Explorer 增強式安全性設定 (ESC)：

   ```
   Invoke-WebRequest https://s3.amazonaws.com/ec2rescue/windows/EC2Rescue_latest.zip -OutFile $env:USERPROFILE\Desktop\EC2Rescue_latest.zip
   ```

   此命令會將 EC2Rescue .zip 檔案下載到目前登入使用者的桌面。
**注意**  
如果您在下載檔案時收到錯誤，且您使用 Windows Server 2016 或更早版本，則 PowerShell 終端機可能需要啟用 TLS 1.2。您可以使用下列命令為目前的 PowerShell 工作階段啟用 TLS 1.2，然後再試一次：  

   ```
   [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
   ```

1. 開啟 EC2Rescue for Windows Server 應用程式並接受授權合約。

1. 選擇 **Next (下一步)**、**Current instance (目前的執行個體)**、**Capture logs (擷取日誌)**。

1. 選取要收集的資料項目並選擇 **Collect... (收集)**。閱讀警告內容，然後選擇 **Yes (是)** 繼續。

1. 為 ZIP 檔案選擇檔案名稱及位置，然後選擇 **Save (儲存)**。

1. 完成 EC2Rescue for Windows Server 之後，選擇 **Open Containing Folder (開啟包含的資料夾)** 檢視 ZIP 檔案。

1. 選擇 **Finish** (完成)。