从现有服务器创建配置Create configurations from existing servers

适用于:Windows PowerShell 5.1Applies To: Windows PowerShell 5.1

从现有服务器创建配置可能很难。Creating configurations from existing servers can be a challenging task. 可能不需要所有设置,只需要你关注的设置。 You might not want all settings, just those that you care about. 即使在这个时候,仍需了解必须以什么顺序应用设置,以便成功应用配置。Even then you need to know in what order the settings must be applied in order for the configuration to apply successfully.

Note

本文引用了一个由开放源代码社区维护的解决方案。This article refers to a solution that is maintained by the Open Source community. 支持仅以 GitHub 协作的形式提供,而不是由 Azure 提供。Support is only available in the form of GitHub collaboration, not from Azure.

社区项目:ReverseDSCCommunity project: ReverseDSC

已创建一个名为 ReverseDSC 的社区维护解决方案,目的是让其在此领域中使用(从 SharePoint 开始)。A community maintained solution named ReverseDSC has been created to work in this area starting SharePoint.

该解决方案基于 SharePointDSC 资源并对其进行了扩展,目的是协调从现有 SharePoint 服务器收集信息的操作。The solution builds on the SharePointDSC resource and extends it to orchestrate gathering information from existing SharePoint servers. 最新版有多个提取模式,用于确定要包括何种级别的信息。The latest version has multiple extraction modes to determine what level of information to include.

使用此解决方案的结果是生成与 SharePointDSC 配置脚本配合使用的配置数据The result of using the solution is generating Configuration Data to be used with SharePointDSC configuration scripts.

生成数据文件后,可以在 DSC 配置脚本中使用这些文件生成 MOF 文件,并将 MOF 文件上传到 Azure 自动化Once the data files have been generated, you can use them with DSC Configuration scripts to generate MOF files and upload the MOF files to Azure Automation. 然后从本地在 Azure 中注册服务器以拉取配置。Then register your servers from either on-premises or in Azure to pull configurations.

若要试用 ReverseDSC,请访问 PowerShell 库并下载解决方案,或单击“项目站点”以查看文档To try out ReverseDSC, visit the PowerShell Gallery and download the solution or click "Project Site" to view the documentation.

后续步骤Next steps