我们正在为新项目的开发/测试/生产环境设置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脚本中明确指定每个子功能吗?