我的要求是在Windows2008 R2 machine.And中添加角色服务我使用的命令如下
Import-Module ServerManager
Add-WindowsFeature "Web-Server" -Restart:$true
Write-Host "i am back after installation"
Add-WindowsFeature "Application-Server" -Restart:$true 但是这个-restart:$true实际上并不是重新启动system.If,这不是我如何实现this.Because添加一个角色的方式,服务期望重新启动,在此之后,只有我能够添加另一个角色。请帮助:)
发布于 2013-06-04 22:31:09
Add-WindowsFeature接受-Name参数的string[] (字符串数组)。您应该能够通过仅调用一次cmdlet来添加多个功能。
Add-WindowsFeature -Name "Web-Server","Application-Server"
然后重新启动服务器。
https://stackoverflow.com/questions/16917502
复制相似问题