从现有服务器创建配置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.

备注

本文引用了由开源社区维护的一个解决方案。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