Answer: One of the best things about Windows Server 2008 R2 is the way we can use PowerShell to install and configure roles and features.
With R2 installing roles and features is really easy and simple, so in this article I’ll show you how to install DHCP server using PowerShell cmdlet with minimum clicks.
To install DHCP Server on Windows Server 2008 R2 follow the steps below:
Note:If you need to set the PowerShell Execution Policy use this article: http://www.ntweekly.com/?p=942
Right Click On the PowerShell icon and Click on Run as Administrator.
In the PowerShell Screen type:
Import-module servermanager
To install the DHCP role type:
Add-windowsFeature –name dhcp -includeallsubfeature
Wait for the installation to finish.
All done.
To start the DHCP service type:
Set-service dhcpserver –startuptype automatic
Start-service dhcpserver
In my next article I’ll show you how to configure DHCP server.