2

我们正在为新项目的开发/测试/生产环境设置PowerShell DSC。明显的目标是所有环境最终都相同。

一个示例是使用WindowsFeature资源来安装该Web-Server功能。这将安装 Web 服务器功能及其一些子功能。

我正在寻找的是有关将自动安装哪些子功能的适当文档。这样我就能够确定我们需要哪些额外的子功能也需要手动安装。

我当然可以在本地检查默认安装哪些子功能:

PS C:\> Install-WindowsFeature Web-Server -WhatIf
What if: Continue with installation?
What if: Performing installation for "[Web Server (IIS)] Web Server (IIS)".
What if: Performing installation for "[Web Server (IIS)] Web Server".
What if: Performing installation for "[Web Server (IIS)] Common HTTP Features".
What if: Performing installation for "[Web Server (IIS)] Default Document".
What if: Performing installation for "[Web Server (IIS)] Directory Browsing".
What if: Performing installation for "[Web Server (IIS)] HTTP Errors".
What if: Performing installation for "[Web Server (IIS)] Static Content".
What if: Performing installation for "[Web Server (IIS)] Health and Diagnostics".
What if: Performing installation for "[Web Server (IIS)] HTTP Logging".
What if: Performing installation for "[Web Server (IIS)] Performance".
What if: Performing installation for "[Web Server (IIS)] Static Content Compression".
What if: Performing installation for "[Web Server (IIS)] Security".
What if: Performing installation for "[Web Server (IIS)] Request Filtering".
What if: The target server may need to be restarted after the installation completes.

Success Restart Needed Exit Code      Feature Result
------- -------------- ---------      --------------
True    Maybe          Success        {Web Server (IIS), Web Server, Common HTTP...

但是我可以相信这在所有服务器上都是相同的结果吗?这是一成不变的,还是会在某个时候改变?

还是我最安全的选择是在我的 DSC 脚本中明确指定每个子功能?

4

0 回答 0