Hi,
This post will describe several ways to install Network Load Balancing (NLB) using the command line interface. In Windows Server 2008 R2 installing Windows Features using scripts at the command line has changed a little since Windows Server 2008. There are four ways to install the feature:
1. Server Manger UI
2. Command Prompt using dism.exe.
3. PowerShell using CMDlets for ServerManager
4. Unattended installs
As the Server Manager UI and unattended installs have not changed in Windows Server 2008 R2, this blog describes installing NLB using dism.exe and PowerShell, which are both new in Windows Server 2008 R2.
Command Prompt Using DISM
To install NLB on Windows Server 2008 R2 Full Installation
1. Open an elevated command prompt and run > dism /online /enable-feature /featurename:NetworkLoadBalancingFullServer
2. If you want to install the management tools only run > dism /online /enable-feature /featurename:NetworkLoadBalancingManagementClient
Install NLB on Windows Server 2008 R2 Core Installation
1. Open an elevated command prompt and run > dism /online /Enable-feature /featurename:NetworkLoadBalancingHeadlessServer
Note that you may need to launch a new command prompt with administrative privileges using the RunAs command.
PowerShell
By default, Server Core does not have management tools such as Nlbmgr.exe or PowerShell CMDlets installed, thus you may want to manage NLB from a remote server. If you want to manage NLB on Server Core locally you must install PowerShell which will include cmdlets for NLB. To install PowerShell in Server Core run the following commands.
1. From a command prompt, run > dism /online /Enable-feature /featurename:NetFx2-ServerCore
Note that you may need to launch a new command prompt with administrative privileges using the RunAs command.
2. Then run > dism /online /Enable-feature /featurename:MicrosoftWindowsPowershell
3. If NLB is not installed, install NLB as described in the section above, ‘Install NLB on Windows Server 2008 R2 Core Installation’
Thanks,
Gary Jackman
Software Test Engineer
Clustering & High-Availability
Microsoft