Subscribe to Windows IT Pro
January 19, 2010 12:00 AM

Q. How can I add and remove Windows roles and features from PowerShell in Windows Server 2008 R2?

Windows IT Pro
InstantDoc ID #103447
Rating: (0)

A. Server 2008 R2 introduces PowerShell cmdlets for the management of Roles and Features. To use them, you just need to import the ServerManager library in PowerShell:

Import-Module servermanager

You can now add and remove roles and features using the Add-WindowsFeature and Remove-WindowsFeature cmdlets. To check all the available roles and features and their install statuses, use the Get-WindowsFeature cmdlet. If the feature is installed, an [X] is displayed, as the sample below shows.



The name on the right side is the name needed to install or remove the feature. For example,

Add-WindowsFeature Hyper-V

would install Hyper-V.

Related Reading:



Check out hundreds more useful Q&As like this in John Savill's FAQ for Windows. Also, watch instructional videos made by John at ITTV.net.

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.