Search The Web

Friday, April 12, 2013

How to Install Features and Roles using PowerShell in Server 2012 and 2008

How to Install Features and Roles using PowerShell in Server 2012 and 2008


Server 2012 allows you to install features and roles via PowerShell. Before doing this, you may need to load the Server Manager Module with the command Import-Module Servermanager .








Firstly, you need to know the name of the windows feature / role that you wish to install. To find this information you enter the command Get-WindowsFeature . This will list the features available to install.



Server 2012

To install a feature or Role on a local machine, open PowerShell and type: install-windowsfeature {featurename} using the feature name you previously identified.







 Often this will require a restart,so you can add the -restart switch to the end of the command if you wish. It is also possible to install a feature on a remote machine using PowerShell by adding the -computername switch to the above command.

Server 2008

In Server 2008, the command to install is a little different to the above, but the switches are the same. The command used to install is add-WindowsFeature {featurename}  .


This Article can also be viewed on or sister site DizzyIT.com at http://dizzyit.com/2013/04/13/install-features-roles-powershell-server-2012-2008/

No comments:

Post a Comment