Q: Using Windows Server 2012, how do I install roles and features to multiple servers at the same time?

How to install Windows Server 2012 roles and features to multiple servers concurrently.

John Savill

June 22, 2012

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A: Windows Server 2012 Server Manager allows management of multiple servers concurrently. However, for remote roles and feature installation, only a single server can be specified. To install roles and features to multiple servers concurrently, use this Windows PowerShell cmdlet:

Install-WindowsFeature cmdlet 

and call using this cmdlet:

Invoke-Command

passing the list of computers. For example, using the commands in this manner

PS C:> $cred = Get-CredentialPS C:> Invoke-Command -ComputerName savdalbfs08, savdalscs01 -Credential $cred -scriptblock {Install-WindowsFeature desktop-experience -Restart -WhatIf}

results in the following output (note that I have used -whatif, which means nothing will actually happen):


What if: Checking if running in 'WhatIf' Mode.
What if: Checking if running in 'WhatIf' Mode.
What if: Performing installation for "[User Interfaces and Infrastructure] Desktop Experience".
What if: Performing installation for "[Ink and Handwriting Services] Ink Support".
What if: Performing installation for "[Ink and Handwriting Services] Ink and Handwriting Services".
What if: Performing installation for "[Media Foundation] Media Foundation".
What if: This server may need to be restarted after the installation completes.

Success Restart Needed Exit Code Feature Result PSComputerName
------- -------------- --------- -------------- --------------
True Maybe Success {Desktop Experience, Ink Support, Ink and ... savdalscs01
What if: Performing installation for "[User Interfaces and Infrastructure] Desktop Experience".
What if: Performing installation for "[Ink and Handwriting Services] Ink Support".
What if: Performing installation for "[Ink and Handwriting Services] Ink and Handwriting Services".
What if: Performing installation for "[Media Foundation] Media Foundation".
What if: This server may need to be restarted after the installation completes.
True Maybe Success {Desktop Experience, Ink Support, Ink and ... savdalbfs08

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like