Sunday, March 21, 2010

Now you can use the Server Manager module for Windows PowerShell

For the Windows PowerShell, command-line counterpart of the Server Manager is ServerManager module. It is not possible to import this module into the Windows PowerShell by default. However, you can import the Module before you can use the cmdlets it provides. Still, if you want to import the Server Manager module, just enter Import-Module ServerManager at the Windows PowerShell prompt. Once you import the Module in the PowerShell prompt, you can use it with the currently running instance of the Windows PowerShell. If you start the Windows PowerShell next time, it is required to import the Module again in order to use its features.

Before importing, please note that you must be running Windows PowerShell with elevated user rights.

Moreover, you can then use the following cmdlets:
•    Add-WindowsFeature
•    Get-WindowsFeature
•    Remove-WindowsFeature

Have a look at the syntax of these three cmdlets:
•    Add-WindowsFeature [-Name] [-IncludeAllSubFeature] [-logPath ] [-WhatIf] [-Restart] [-Concurrent] []
•    Get-WindowsFeature [[-Name] ] [-logPath ] []
•    Remove-WindowsFeature [-Name] [-logPath ] [-WhatIf] [-Restart] [-Concurrent] []