

# 使用 EC2Launch v1 代理在 EC2 Windows 实例启动期间执行任务
<a name="ec2launch"></a>

适用于 Windows Server 2016 和 2019 的 Amazon 托管 AMI 包含一组名为 EC2Launch 的 Windows Powershell 脚本。EC2Launch 在初始实例启动期间执行各种任务。有关 AWS Windows AMI 中包含的 EC2Launch 版本的信息，请参阅 [AWS Windows AMI Reference](https://docs.aws.amazon.com/ec2/latest/windows-ami-reference/windows-amis.html)。

**注意**  
Windows Server 2016 及更高版本操作系统的最新启动代理是 EC2Launch v2，它取代了 EC2Config 和 EC2Launch，并预安装在名称以 `EC2LaunchV2-Windows_Server-*` 开头的 AWS Windows Server 2016 和 2019 AMI 上。您也可以在 Windows Server 2016 和 2019 上手动安装和配置代理。有关更多信息，请参阅 [安装 EC2Launch v2](ec2launch-v2-install.md)。  
要将 EC2Launch 与 IMDSv2 一起使用，版本必须为 1.3.2002730 或更高版本。

您可以使用以下 Windows PowerShell 命令验证已安装的 EC2Launch 版本。

```
Test-ModuleManifest -Path "C:\ProgramData\Amazon\EC2-Windows\Launch\Module\Ec2Launch.psd1" | Select Version
```

## EC2Launch 任务
<a name="ec2launch-tasks"></a>

在初始实例启动期间，默认情况下 EC2Launch 执行以下任务：
+ 设置用来呈现实例相关信息的新墙纸。
+ 将计算机名称设置为实例的私有 IPv4 地址。
+ 向 Amazon EC2 控制台发送实例信息。
+ 向 EC2 控制台发送 RDP 证书指纹。
+ 设置管理员账户的随机密码。
+ 添加 DNS 后缀。
+ 动态扩展操作系统分区以包含所有未分区的空间。
+ 执行用户数据 (如果指定)。有关指定用户数据的更多信息，请参阅[在启动包含用户数据输入的 EC2 实例时运行命令](user-data.md)。
+  设置持久静态路由以访问元数据服务和 AWS KMS 服务器。
**重要**  
如果从此实例创建了自定义 AMI，则捕获这些路由作为操作配置的一部分，并且从 AMI 启动的任意新实例将保留相同的路由，而不论其子网放置如何。要更新路由，请参阅[在启动自定义 AMI 时更新 Server 2016 及更高版本的元数据/KMS 路由](ec2launch-sysprep.md#update-metadata-KMS)。

以下任务有助于保持与 EC2Config 服务的向后兼容。在启动期间，您还可以配置 EC2Launch 来执行以下任务：
+ 初始化辅助 EBS 卷。
+ 将 Windows 事件日志发送到 EC2 控制台日志。
+ 将 *Windows 已可供使用* 消息发送到 EC2 控制台。

## EC2Launch 目录结构
<a name="ec2launch-directories"></a>

默认情况下，EC2Launch 安装在根目录 `C:\ProgramData\Amazon\EC2-Windows\Launch` 中的 Windows Server 2016 及更高版本 AMI 上。

**注意**  
默认情况下，Windows 会隐藏 `C:\ProgramData` 下的文件和文件夹。要查看 EC2Launch 目录和文件，必须在 Windows 资源管理器中键入路径，或者更改文件夹属性以显示隐藏的文件和文件夹。

`Launch` 目录包含以下子目录。
+ `Scripts` — 包含组成 EC2Launch 的 PowerShell 脚本。
+ `Module` — 包含用于生成与 Amazon EC2 相关的脚本的模块。
+ `Config` — 包含您可以自定义的脚本配置文件。
+ `Sysprep` — 包含 Sysprep 资源。
+ `Settings` — 包含一个适用于 Sysprep 图形用户界面的应用程序。
+ `Library` — 包含 EC2 启动代理的共享库。
+ `Log` — 包含脚本的子目录和脚本生成的日志文件。

## 遥测
<a name="ec2launch-telemetry"></a>

遥测是附加信息，可帮助 AWS 更好地了解您的需求、诊断问题并提供功能，以改善 AWS 服务带给您的体验。

EC2Launch 版本 `1.3.2003498` 及更高版本会收集遥测，例如使用情况指标和错误。此数据是从运行 EC2Launch 的 Amazon EC2 实例收集的。这包括 AWS 拥有的所有 Windows AMI。

EC2Launch 收集以下类型的遥测：
+ **使用情况信息** — 代理命令、安装方法和计划的运行频率。
+ **错误和诊断信息** — 代理安装和运行错误代码。

收集的数据示例：

```
2021/07/15 21:44:12Z: EC2LaunchTelemetry: IsAgentScheduledPerBoot=true
2021/07/15 21:44:12Z: EC2LaunchTelemetry: IsUserDataScheduledPerBoot=true
2021/07/15 21:44:12Z: EC2LaunchTelemetry: AgentCommandCode=1
2021/07/15 21:44:12Z: EC2LaunchTelemetry: AgentCommandErrorCode=5
2021/07/15 21:44:12Z: EC2LaunchTelemetry: AgentInstallCode=2
2021/07/15 21:44:12Z: EC2LaunchTelemetry: AgentInstallErrorCode=0
```

预设情况下，遥测处于启用状态。您可以随时禁用遥测收集。如果启用了遥测，EC2Launch 会发送遥测数据，无需额外的客户通知。

已收集您启用或禁用遥测的选择。

您可以选择或取消遥测收集。收集您选择或取消遥测的选择，以确保我们能够遵守您的遥测选项。

**遥测可见性**  
启用遥测后，它将显示在 Amazon EC2 控制台输出中，如下所示：

```
2021/07/15 21:44:12Z: Telemetry: <Data>
```

**在实例上禁用遥测**  
要通过设置系统环境变量来禁用遥测，请以管理员身份运行以下命令：

```
setx /M EC2LAUNCH_TELEMETRY 0
```

如需在安装过程中禁用遥测，请按照如下所示运行 `install.ps1`：

```
. .\install.ps1 -EnableTelemetry:$false
```

**Topics**
+ [EC2Launch 任务](#ec2launch-tasks)
+ [EC2Launch 目录结构](#ec2launch-directories)
+ [遥测](#ec2launch-telemetry)
+ [安装最新版本的 EC2Launch](ec2launch-download.md)
+ [在 Windows 实例上配置 EC2Launch v1 代理](ec2launch-config.md)
+ [EC2Launch 版本历史记录](ec2launch-version-details.md)

# 安装最新版本的 EC2Launch
<a name="ec2launch-download"></a>

使用以下过程在实例上下载并安装最新版本的 EC2Launch。

**下载并安装最新版本的 EC2Launch**

1. 如果已在实例上安装和配置 EC2Launch，请备份 EC2Launch 配置文件。安装过程不保留此文件中的更改。默认情况下，该文件位于以下 `C:\ProgramData\Amazon\EC2-Windows\Launch\Config` 目录中。

1. 将 [EC2-Windows-Launch.zip](https://s3.amazonaws.com/ec2-downloads-windows/EC2Launch/latest/EC2-Windows-Launch.zip) 下载到实例上的一个目录中。

1. 将 [install.ps1](https://s3.amazonaws.com/ec2-downloads-windows/EC2Launch/latest/install.ps1) 下载到 `EC2-Windows-Launch.zip` 的下载目录中。

1. 运行 `install.ps1`

1. 如果您对 EC2Launch 配置文件进行了备份，则将其复制到 `C:\ProgramData\Amazon\EC2-Windows\Launch\Config` 目录。

**要使用 PowerShell 下载并安装最新版本的 EC2Launch**  
如果已在实例上安装和配置 EC2Launch，请备份 EC2Launch 配置文件。安装过程不保留此文件中的更改。默认情况下，该文件位于以下 `C:\ProgramData\Amazon\EC2-Windows\Launch\Config` 目录中。

要使用 PowerShell 安装最新版本的 EC2Launch，请以管理员身份在 PowerShell 窗口中运行以下命令：

```
mkdir $env:USERPROFILE\Desktop\EC2Launch
$Url = "https://s3.amazonaws.com/ec2-downloads-windows/EC2Launch/latest/EC2-Windows-Launch.zip"
$DownloadZipFile = "$env:USERPROFILE\Desktop\EC2Launch\" + $(Split-Path -Path $Url -Leaf)
Invoke-WebRequest -Uri $Url -OutFile $DownloadZipFile
$Url = "https://s3.amazonaws.com/ec2-downloads-windows/EC2Launch/latest/install.ps1"
$DownloadZipFile = "$env:USERPROFILE\Desktop\EC2Launch\" + $(Split-Path -Path $Url -Leaf)
Invoke-WebRequest -Uri $Url -OutFile $DownloadZipFile
& $env:USERPROFILE\Desktop\EC2Launch\install.ps1
```

**注意**  
如果您在下载文件时收到错误，并且正在使用 Windows Server 2016，则可能需要为 PowerShell 终端启用 TLS 1.2。可以使用以下命令为当前 PowerShell 会话启用 TLS 1.2，然后重试：  

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

通过检查启动代理来验证安装。以管理员身份在 PowerShell 窗口运行以下命令：

```
Import-Module C:\ProgramData\Amazon\EC2-Windows\Launch\Module\Ec2Launch.psm1
Import-LocalizedData -BaseDirectory C:\ProgramData\Amazon\EC2-Windows\Launch\Module\ -FileName 'Ec2Launch.psd1' -BindingVariable moduleManifest
$moduleManifest.Get_Item('ModuleVersion')
```

# 在 Windows 实例上配置 EC2Launch v1 代理
<a name="ec2launch-config"></a>

在您的实例首次初始化后，您可以配置 EC2Launch 以再次运行并执行不同的启动任务。

**Topics**
+ [配置初始化文件](#ec2launch-inittasks)
+ [计划 EC2Launch 在每次启动时运行](#run-on-every-boot)
+ [初始化驱动器并映射盘符](#ec2launch-mapping)
+ [将 Windows 事件日志发送到 EC2 控制台](#ec2launch-sendlogs)
+ [在成功启动后发送 Windows 已准备就绪消息](#ec2launch-sendwinisready)

## 配置初始化文件
<a name="ec2launch-inittasks"></a>

指定 `LaunchConfig.json` 文件中的设置以启用或禁用以下初始化任务：
+ 将计算机名称设置为实例的私有 IPv4 地址。
+ 将显示器设置为始终保持打开状态。
+ 设置新墙纸。
+ 添加 DNS 后缀列表。
**注意**  
这会为以下域添加 DNS 后缀查找，并配置其他标准后缀。有关启动代理如何设置 DNS 后缀的更多信息，请参阅 [为 EC2 Windows 启动代理配置 DNS 后缀](launch-agents-set-dns.md)。  

  ```
  region.ec2-utilities.amazonaws.com
  ```
+ 扩展引导卷大小。
+ 设置管理员密码。

**配置初始化设置**

1. 在要配置的实例上，在文本编辑器中打开以下文件：`C:\ProgramData\Amazon\EC2-Windows\Launch\Config\LaunchConfig.json`。

1. 根据需要更新以下设置并保存您的更改。仅当 `adminPassword` 为 `adminPasswordtype` 时，在 `Specify` 中提供密码。

   ```
   {
   	"setComputerName": false,
   	"setMonitorAlwaysOn": true,
   	"setWallpaper": true,
   	"addDnsSuffixList": true,
   	"extendBootVolumeSize": true,
   	"handleUserData": true,					  
   	"adminPasswordType": "Random | Specify | DoNothing",
   	"adminPassword": "password that adheres to your security policy (optional)"
   }
   ```

   密码类型定义如下：  
`Random`  
EC2Launch 生成一个密码并使用用户的密钥对其进行加密。系统会在实例启动后禁用此设置，以便在重新启动或停止再启动实例后该密码仍然存在。  
`Specify`  
EC2Launch 使用您在 `adminPassword` 中指定的密码。如果密码不满足系统要求，EC2Launch 会生成随机密码。该密码以明文方式存储在 `LaunchConfig.json` 文件中，并且在 Sysprep 设置管理员密码时会被删除。EC2Launch 使用用户的密钥对密码进行加密。  
`DoNothing`  
EC2Launch 使用您在 `unattend.xml` 文件中指定的密码。如果未在 `unattend.xml` 中指定密码，管理员账户会被禁用。

1. 在 Windows PowerShell 中运行以下命令，以便安排脚本作为 Windows 计划任务运行。该脚本将在下次启动期间执行一次，然后禁止这些任务再次运行。

   ```
   C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\InitializeInstance.ps1 -Schedule
   ```

## 计划 EC2Launch 在每次启动时运行
<a name="run-on-every-boot"></a>

您可以计划 EC2Launch 在每次启动时运行，而不是仅仅在首次启动时运行。

要允许 EC2Launch 在每次启动时运行，请执行以下操作：

1. 打开 Windows PowerShell 并运行以下命令：

   ```
   C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\InitializeInstance.ps1 -SchedulePerBoot
   ```

1. 或者，使用以下命令运行可执行文件：

   ```
   C:\ProgramData\Amazon\EC2-Windows\Launch\Settings\Ec2LaunchSettings.exe
   ```

   然后选择 `Run EC2Launch on every boot`。您可以为 EC2 实例指定 `Shutdown without Sysprep` 或 `Shutdown with Sysprep`。

**注意**  
当您允许 EC2Launch 在每次启动时运行，下次 EC2Launch 运行时将发生以下情况：  
如果 `AdminPasswordType` 仍设置为 `Random`，则 EC2Launch 将在下次启动时生成新密码。在启动之后，`AdminPasswordType` 会自动设置为 `DoNothing`，以防止 EC2Launch 在后续启动时生成新密码。要防止 EC2Launch 在第一次启动时生成新密码，请手动将 `AdminPasswordType` 设置为 `DoNothing`，然后再重新启动。
除非用户数据的 `HandleUserData` 设置为 `false`，否则 `persist` 将设置回 `true`。有关更多信息，请参阅 [用户数据脚本](user-data.md#user-data-scripts)。

## 初始化驱动器并映射盘符
<a name="ec2launch-mapping"></a>

在 `DriveLetterMappingConfig.json` 文件中指定设置以将盘符映射到您的 EC2 实例上的卷。该脚本用于初始化尚未初始化和分区的驱动器。有关在 Windows 中获取卷详细信息的更多信息，请参阅 Microsoft 文档中的 [Get-Volume](https://learn.microsoft.com/en-us/powershell/module/storage/get-volume)。

**将盘符映射到卷**

1. 在文本编辑器中打开 `C:\ProgramData\Amazon\EC2-Windows\Launch\Config\DriveLetterMappingConfig.json` 文件。

1. 指定以下卷设置并保存您的更改：

   ```
   {
   	"driveLetterMapping": [
   		{
   			"volumeName": "sample volume",
   			"driveLetter": "H"
   		}
   	]
   }
   ```

1. 打开 Windows PowerShell 并使用以下命令来运行初始化磁盘的 EC2Launch 脚本：

   ```
   C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\InitializeDisks.ps1
   ```

   要在每次实例启动时初始化磁盘，请添加 `-Schedule` 标记，如下所示：

   ```
   C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\InitializeDisks.ps1 -Schedule
   ```

## 将 Windows 事件日志发送到 EC2 控制台
<a name="ec2launch-sendlogs"></a>

在 `EventLogConfig.json` 文件中指定设置，以便将 Windows 事件日志发送到 EC2 控制台日志。

**配置设置来发送 Windows 事件日志**

1. 在实例上，在文本编辑器中 `C:\ProgramData\Amazon\EC2-Windows\Launch\Config\EventLogConfig.json` 打开文件。

1. 配置以下日志设置并保存您的更改：

   ```
   {
   	"events": [
   		{
   			"logName": "System",
   			"source": "An event source (optional)",
   			"level": "Error | Warning | Information",
   			"numEntries": 3
   		}
   	]
   }
   ```

1. 在 Windows PowerShell 中运行以下命令，以便每当实例启动时系统都安排脚本作为 Windows 计划任务运行。

   ```
   C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\SendEventLogs.ps1 -Schedule
   ```

   日志可能需要三分钟或更长时间才会显示在 EC2 控制台日志中。

## 在成功启动后发送 Windows 已准备就绪消息
<a name="ec2launch-sendwinisready"></a>

在每次启动后，EC2Config 服务会向 EC2 控制台发送“Windows 已准备就绪”消息。EC2Launch 仅在初次启动后发送此消息。为了实现与 EC2Config 服务的向后兼容，您可以安排 EC2Launch 在每次启动时发送此消息。在实例上，打开 Windows PowerShell 并运行以下命令。系统会安排脚本作为 Windows 计划任务运行。

```
C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\SendWindowsIsReady.ps1 -Schedule
```

# EC2Launch 版本历史记录
<a name="ec2launch-version-details"></a>

要下载并安装最新版本的 EC2Launch，请参阅[安装最新版本的 EC2Launch](ec2launch-download.md)。

下表说明已发行的 EC2Launch 版本。


| 版本 | 详细信息 | 发行日期 | 
| --- | --- | --- | 
| 1.4.299 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  | 2026 年 3 月 3 日 | 
| 1.4.183 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  | 2026 年 2 月 4 日 | 
| 1.4.6 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  | 2025 年 10 月 13 日 | 
| 1.3.2005119 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  | 2025 年 2 月 11 日 | 
| 1.3.2005065 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  | 2024 年 10 月 22 日 | 
| 1.3.2005008 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  | 2024 年 8 月 6 日 | 
| 1.3.2004959 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  | 2024 年 7 月 2 日 | 
| 1.3.2004891 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  | 2024 年 5 月 31 日 | 
| 1.3.2004617 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  | 2024 年 1 月 15 日 | 
| 1.3.2004592 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html) 有关 EC2Launch 目录的访问权限和用户账户权限的更多信息，请参阅 [EC2Launch 目录结构](ec2launch.md#ec2launch-directories)。 | 2024 年 1 月 2 日 | 
| 1.3.2004491 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html) | 2023 年 11 月 9 日 | 
| 1.3.2004462 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html) | 2023 年 10 月 18 日 | 
| 1.3.2004438 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html) | 2023 年 10 月 4 日 | 
| 1.3.2004256 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html) | 2023 年 7 月 7 日 | 
| 1.3.2004052 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html) | 2023 年 3 月 8 日 | 
| 1.3.2003975 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html) | 2022 年 12 月 24 日 | 
| 1.3.2003961 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html) | 2022 年 12 月 6 日 | 
| 1.3.2003923 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html) | 2022 年 11 月 9 日 | 
| 1.3.2003919  | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html) | 2022 年 11 月 8 日 | 
| 1.3.2003857 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html) | 2022 年 10 月 3 日 | 
| 1.3.2003824 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html) | 2022 年 8 月 30 日 | 
| 1.3.2003691 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html) | 2022 年 6 月 21 日 | 
| 1.3.2003639 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html) | 2022 年 5 月 10 日 | 
| 1.3.2003498 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html) | 2022 年 1 月 31 日 | 
| 1.3.2003411 | 更改的密码生成逻辑，以排除复杂性较低的密码。 | 2021 年 8 月 4 日 | 
| 1.3.2003364 | 更新了 Install-EgpuManager 的 IMDSv2 支持。 | 2021 年 6 月 7 日 | 
| 1.3.2003312 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  | 2021 年 5 月 4 日 | 
| 1.3.2003284 | 通过将用于存储用户数据的位置更新为 LocalAppData 改进了权限模型。 | 2021 年 3 月 23 日 | 
| 1.3.2003236 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html) | 2021 年 2 月11 日 | 
| 1.3.2003210 | install.ps1 的本地化修复。 | 2021 年 1 月 7 日 | 
| 1.3.2003205 | 用于更新 install.ps1 目录权限的 %ProgramData%AmazonEC2-WindowsLaunchModuleScripts 安全修复程序。 | 2020 年 12 月 28 日 | 
| 1.3.2003189 | 添加路线后添加 w32tm resync。 | 2020 年 12 月 4 日 | 
| 1.3.2003155 | 更新了实例类型信息。 | 2020 年 8 月 25 日 | 
| 1.3.2003150 | 已将 OsCurrentBuild 和 OsReleaseId 添加到控制台输出。 | 2020 年 4 月 22 日 | 
| 1.3.2003040 | 修复了 IMDS 版本 1 回退逻辑。 | 2020 年 4 月 7 日 | 
|  1.3.2002730  | 添加了对 IMDS V2 的支持。 | 2020 年 3 月 3 日 | 
|  1.3.2002240  | 修复了一些小问题。 | 2019 年 10 月 31 日 | 
|  1.3.2001660  | 修复了首次执行 Sysprep 后用户不使用密码自动登录的问题。 | 2019 年 7 月 2 日 | 
|  1.3.2001360  | 修复了一些小问题。 | 2019 年 3 月 27 日 | 
|  1.3.2001220  | 所有 PowerShell 脚本已签名。 | 2019 年 2 月 28 日 | 
|  1.3.2001200  | 修复了其中在 Windows Server 故障失效转移集群中的节点上运行该脚本的 InitializeDisks.ps1 将在其盘符与本地盘符匹配的远程节点上格式化驱动器的问题。 | 2019 年 2 月 27 日 | 
|  1.3.2001160  | 修复了 Windows 2019 中缺失壁纸的问题。 | 2019 年 2 月 22 日 | 
|  1.3.2001040  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  | 2019 年 1 月 21 日 | 
|  1.3.2000930  | 修复了在启用了 ipv6 的 ENI 上向元数据添加路由的问题。 | 2019 年 1 月 2 日 | 
|  1.3.2000760  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  | 2018 年 12 月 5 日 | 
|  1.3.2000630  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  | 2018 年 11 月 9 日 | 
|  1.3.2000430.0  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  | 2018 年 9 月 19 日 | 
|  1.3.200039.0  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  | 2018 年 8 月 15 日 | 
|  1.3.2000080  | 修复了一些小问题。 |  | 
|  1.3.610  |  修复了将输出和错误从用户数据重定向至文件的问题。  |  | 
|  1.3.590  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  |  | 
|  1.3.580  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  |  | 
|  1.3.550  |  添加了 `-NoShutdown` 选项以在不关机的情况下启用 Sysprep。  |  | 
|  1.3.540  |  修复了一些小问题。  |  | 
|  1.3.530  |  修复了一些小问题。  |  | 
|  1.3.521  |  修复了一些小问题。  |  | 
|  1.3.0  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  |  | 
|  1.2.0  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  |  | 
|  1.1.2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2launch-version-details.html)  |  | 
|  1.1.1  |  初始版本。  |  | 