【发布时间】:2015-04-16 02:31:36
【问题描述】:
下面是 AWS Cloudformation 模板的 sn-p,我想在创建 Windows Server 2012 R2(64 位)后使用 PowerShell 安装 Web Server Windows 功能。但是,AWS Cloudformation 成功创建了 Windows Server 2012 EC2 实例,但没有安装 Web 服务器角色。
"commands" : {
"1-install-roles" : {
"command" : { "Fn::Join" : [ "", [
"if not \"None\" EQU \"",
{ "Ref" : "Roles" },
"\" (powershell -Command \"Install-WindowsFeature -Name Web-Server -IncludeAllSubFeature ",
{ "Ref" : "Roles" },
" -Restart\")"]]
}
},
感谢您的指导。
【问题讨论】: