Configuring Roles and Features in Windows Server 2008 R2
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:
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.