Server Manager’s command-line counterpart is the ServerManager module for Windows PowerShell. Generally, this module is not imported into Windows PowerShell by default. Instead, you need to import the module before you can use the cmdlets it provides. To import the Server Manager module, enter Import-Module ServerManager
at the Windows PowerShell prompt. Once the module is imported, you can use it with the currently running instance of Windows PowerShell. The next time you start Windows PowerShell, you’ll need to import the module again if you want to use its features.
Note that you must be running Windows PowerShell with elevated user rights.
You can then use the following cmdlets:
Here is a look at the syntax of these three cmdlets:
- Add-WindowsFeature [-Name] <string> [-IncludeAllSubFeature] [-logPath <string>] [-WhatIf] [-Restart] [-Concurrent] [<CommonParameters>]
- Get-WindowsFeature [[-Name] <string>] [-logPath <string>] [<CommonParameters>]
- Remove-WindowsFeature [-Name] <string> [-logPath <string>] [-WhatIf] [-Restart] [-Concurrent] [<CommonParameters>]
A simple sample, add-windowsfeature nlb
would install Network Load Balancing.