

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 加速 Microsoft 工作负载的发现以及向 AWS 的迁移
<a name="accelerate-the-discovery-and-migration-of-microsoft-workloads-to-aws"></a>

*Ali Alzand，Amazon Web Services*

## Summary
<a name="accelerate-the-discovery-and-migration-of-microsoft-workloads-to-aws-summary"></a>

此模式向您展示如何使用[迁移验证工具包 PowerShell 模块](https://github.com/aws-samples/migration-validator-toolkit-for-microsoft-workloads)来发现您的 Microsoft 工作负载并将其迁移到 AWS。该模块的工作原理是，对与任何 Microsoft 工作负载关联的常见任务执行多项检查和验证。例如，该模块会检查可能连接有多个磁盘的实例或使用许多 IP 地址的实例。有关该模块可以执行的检查的完整列表，请参阅模块 GitHub 页面上的 “[检查](https://github.com/aws-samples/migration-validator-toolkit-for-microsoft-workloads#checks)” 部分。

迁移验证工具包 PowerShell 模块可以帮助您的组织减少在发现 Microsoft 工作负载上正在运行哪些应用程序和服务时所花费的时间和精力。该模块还可以帮助您确定工作负载的配置，以便您可以了解 AWS 是否支持您的配置。该模块还提供后续步骤和缓解操作的建议，这样您就可以避免在迁移之前、期间或之后出现任何配置错误。

## 先决条件和限制
<a name="accelerate-the-discovery-and-migration-of-microsoft-workloads-to-aws-prereqs"></a>

**先决条件**
+ 本地管理员账户
+ PowerShell 4.0

**限制**
+ 仅可用于 Microsoft Windows Server 2012 R2 或更高版本

## 工具
<a name="accelerate-the-discovery-and-migration-of-microsoft-workloads-to-aws-tools"></a>

**工具**
+ PowerShell 4.0

**代码存储库**

此模式的迁移验证工具包 PowerShell 模块可在-microsoft GitHub [migration-validator-toolkit-for-](https://github.com/aws-samples/migration-validator-toolkit-for-microsoft-workloads) workdloads 存储库中找到。

## 操作说明
<a name="accelerate-the-discovery-and-migration-of-microsoft-workloads-to-aws-epics"></a>

### 在单个目标上运行迁移验证工具包 PowerShell 模块
<a name="run-the-migration-validator-toolkit-powershell-module-on-a-single-target"></a>


| Task | 说明 | 所需技能 | 
| --- | --- | --- | 
| 下载、解压缩、导入和调用模块。 | 选择下列方法之一来访问您的凭证。[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/patterns/accelerate-the-discovery-and-migration-of-microsoft-workloads-to-aws.html)**运行 PowerShell 脚本**在中 PowerShell，运行以下示例代码：<pre>#MigrationValidatorToolkit<br />$uri = 'https://github.com/aws-samples/migration-validator-toolkit-for-microsoft-workloads/archive/refs/heads/main.zip'<br />$destination = (Get-Location).Path<br />if ((Test-Path -Path "$destination\MigrationValidatorToolkit.zip" -PathType Leaf) -or (Test-Path -Path "$destination\MigrationValidatorToolkit")) {<br />    write-host "File $destination\MigrationValidatorToolkit.zip or folder $destination\MigrationValidatorToolkit found, exiting"<br />}else {<br />    Write-host "Enable TLS 1.2 for this PowerShell session only."<br />    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12<br />    $webClient = New-Object System.Net.WebClient<br />    Write-host "Downloading MigrationValidatorToolkit.zip"<br />    $webClient.DownloadFile($uri, "$destination\MigrationValidatorToolkit.zip")<br />    Write-host "MigrationValidatorToolkit.zip download successfully"<br />    Add-Type -Assembly "system.io.compression.filesystem"<br />    [System.IO.Compression.ZipFile]::ExtractToDirectory("$destination\MigrationValidatorToolkit.zip","$destination\MigrationValidatorToolkit")<br />    Write-host "Extracting MigrationValidatorToolkit.zip complete successfully"<br />    Import-Module "$destination\MigrationValidatorToolkit\migration-validator-toolkit-for-microsoft-workloads-main\MigrationValidatorToolkit.psm1"; Invoke-MigrationValidatorToolkit<br />}</pre>该代码从 .zip 文件下载模块。然后，该代码提取、导入和调用该模块。**下载并解压缩 .zip 文件**[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/patterns/accelerate-the-discovery-and-migration-of-microsoft-workloads-to-aws.html)**克隆 GitHub 存储库**[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/patterns/accelerate-the-discovery-and-migration-of-microsoft-workloads-to-aws.html) | 系统管理员 | 
| 手动调用模块。 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/patterns/accelerate-the-discovery-and-migration-of-microsoft-workloads-to-aws.html)[Format-Table](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/format-table?view=powershell-7.3) 格式：<pre>Import-Module .\MigrationValidatorToolkit.psm1;Invoke-MigrationValidatorToolkit</pre>[Format-List](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/format-list?view=powershell-7.3) 格式：<pre>Import-Module .\MigrationValidatorToolkit.psm1;Invoke-MigrationValidatorToolkit -List</pre>[输出GridView](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/out-gridview?view=powershell-7.3)格式：<pre>Import-Module .\MigrationValidatorToolkit.psm1;Invoke-MigrationValidatorToolkit -GridView</pre>[ConvertTo-csv](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/convertto-csv?view=powershell-7.3) 格式：<pre>Import-Module .\MigrationValidatorToolkit.psm1;Invoke-MigrationValidatorToolkit -csv</pre> | 系统管理员 | 

### 在多个目标上运行迁移验证工具包 PowerShell 模块
<a name="run-the-migration-validator-toolkit-powershell-module-on-multiple-targets"></a>


| Task | 说明 | 所需技能 | 
| --- | --- | --- | 
| 下载.zip 文件或克隆 GitHub 存储库。 | 请选择以下选项之一：[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/patterns/accelerate-the-discovery-and-migration-of-microsoft-workloads-to-aws.html)<pre>git clone https://github.com/aws-samples/migration-validator-toolkit-for-microsoft-workloads.git</pre> | 系统管理员 | 
| 更新 server.csv 列表。 | 如果已下载 .zip 文件，请执行下面的步骤：[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/patterns/accelerate-the-discovery-and-migration-of-microsoft-workloads-to-aws.html) | 系统管理员 | 
| 调用模块。 | 您可以使用该域内的任何使用对目标计算机拥有管理员访问权限的域用户的计算机。[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/patterns/accelerate-the-discovery-and-migration-of-microsoft-workloads-to-aws.html)<pre>Import-Module .\MigrationValidatorToolkit.psm1;Invoke-DomainComputers</pre>输出 .csv 文件以前缀名称 `DomainComputers_MigrationAutomations_YYYY-MM-DDTHH-MM-SS` 保存在 `MigrationValidatorToolkit\Outputs\folder` 中。 | 系统管理员 | 

## 问题排查
<a name="accelerate-the-discovery-and-migration-of-microsoft-workloads-to-aws-troubleshooting"></a>


| 问题 | 解决方案 | 
| --- | --- | 
| `MigrationValidatorToolkit` 将有关执行、命令和错误的信息写入正在运行的主机上的日志文件。 | 您可以通过以下方式之一手动查看日志文件。[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/prescriptive-guidance/latest/patterns/accelerate-the-discovery-and-migration-of-microsoft-workloads-to-aws.html) | 

## 相关资源
<a name="accelerate-the-discovery-and-migration-of-microsoft-workloads-to-aws-resources"></a>
+ [将 Microsoft 工作负载迁移到 AWS 的选项、工具和最佳实践](https://docs.aws.amazon.com/prescriptive-guidance/latest/migration-microsoft-workloads-aws/introduction.html)（AWS 规范指引）
+ [Microsoft 迁移模式](https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/migration-migration-patterns-by-workload-microsoft-pattern-list.html)（AWS 规范指引）
+ [AWS 上的免费云迁移服务](https://aws.amazon.com/free/migration/)（AWS 文档）
+ [预定义的发布后操作](https://docs.aws.amazon.com/mgn/latest/ug/predefined-post-launch-actions.html)（应用程序营销文档）

## 附加信息
<a name="accelerate-the-discovery-and-migration-of-microsoft-workloads-to-aws-additional"></a>

**常见问题**

*在哪里可以运行迁移验证工具包 PowerShell 模块？*

您可以在 Microsoft Windows Server 2012 R2 或更高版本上运行该模块。

*我什么时候运行这个模块？*

我们建议您在迁移过程的[评侧阶段](https://aws.amazon.com/cloud-migration/how-to-migrate/)运行该模块。

*该模块会修改我的现有服务器吗？*

否。此模块中的所有操作均为只读。

*运行该模块需要多长时间？*

运行该模块通常需要 1-5 分钟，但这取决于服务器的资源分配。

*该模块需要什么权限来运行？*

您必须使用本地管理员账户运行该模块。

*我可以在物理服务器上运行该模块吗？*

是的，只要操作系统是 Microsoft Windows Server 2012 R2 或更高版本就行。

*如何为多台服务器大规模运行该模块？*

要在多台加入域的计算机上大规模运行该模块，请按照本指南中 “在*多个目标上运行迁移验证器工具包” PowerShell 模块*中的步骤进行操作。对于未加入域的计算机，请使用远程调用或按照本指南中在*单个目标长篇故事上运行迁移验证器工具包 PowerShell 模块中的步骤在本地运行该*模块。