Home > General, Utilities > Configuring Roles and Features in Windows Server 2008 R2

Configuring Roles and Features in Windows Server 2008 R2

August 26, 2009

Windows Server 2008 includes a command-line utility called servermanagercmd.exe that allows administrators to configure roles, role services, and features from the command line. Beginning with Windows Server 2008 R2, however, servermanagercmd.exe has been deprecated. When you attempt to run servermanagercmd.exe you will receive the following message:

Servermanagercmd.exe is deprecated, and is not guaranteed to be supported in future releases of Windows. We recommend that you use the Windows PowerShell cmdlets that are available for Server Manager.

Servermanagercmd.exe has been replaced with new PowerShell Server Manager cmdlets (pronounced ‘command-lets’). Before we can use these new cmdlets we must first import them. Open an elevated PowerShell command prompt and enter the following command:

import-module servermanager

Here are the three new PowerShell cmdlets and their corresponding servermanagercmd.exe equivalents [in brackets]:

Add-WindowsFeature [servermanagercmd.exe –install]

Get-WindowsFeature [servermanagercmd.exe –query]

Remove-WindowsFeature [servermanagercmd.exe –remove]

For more information regarding the new PowerShell cmdlets and servermanagercmd.exe, please refer to the Overview of Server Manager Commands article on Microsoft Technet.

Categories: General, Utilities
  1. Greg DeCecco
    February 4, 2010 at 9:21 pm

    While I’m sure that their intentions were good, this new method of retrieving this data has become more complex. It used to be simple:

    Elevated Command Prompt
    “ServerManagerCMD -Query”;

    but now it’s:

    Elevated Command Prompt
    “import-module servermanager”
    “Get-WindowsFeature | Format-Table -autosize”

    You’ve got to add that last bit involving the pipe if you want to be able to read the output without lines being truncated.

    Yes, it does take only a few more characters than before; but that’s not the point. I used to jokingly say “As Microsoft makes the GUI more user friendly, I rely more and more upon the command prompt.” Back in Windows 2000, I could jump into a server, whip through the GUI menus and jump back out in no time flat. That’s no longer true. I still haven’t got used to the updated ‘Control Panel’ and the ‘Network and Sharing Center’; their design slows me down. So I started moving towards the command prompt. After seeing how the ServerManagerCMD functionality has been moved to PowerShell, I guess even the CLI isn’t safe from being improved.

  2. February 5, 2010 at 1:35 am

    I agree with you completely, Greg. : )

  1. No trackbacks yet.
Comments are closed.