How to Install, Configure, and Uninstall DHCP Server on Windows Server?
A DHCP server (Dynamic Host Configuration Protocol) simplifies network management by automatically assigning IP addresses to devices on a network. Below is a step-by-step guide on how to install, configure, and uninstall a DHCP server in Windows Server using both Server Manager and PowerShell.
If you want to install DHCP server in Windows Server, here is how you can do that. It is possible to install and uninstall the DHCP server with the help of Server Manager and PowerShell.
How to install DHCP server Using server manager?
- Launch Server Manager:
- Open the Server Manager application on your Windows Server.
- Add Roles and Features:
- Click on Manage > Add Roles and Features.
- Select Installation Type:
- Choose the Role-based or feature-based installation option and click Next.
- Choose the Server:
- Select the desired server from the server pool. For single-server setups, click Next.
- Enable DHCP Role:
- Check the box for DHCP Server and click Next.
- When prompted, click Add Features to include necessary management tools.
- Start the Installation:
- Review the summary and click Install to initiate the installation process.
- Completion:
- After the process finishes, close the wizard.
A DHCP or Dynamic Host Configuration Protocol server helps you configure an organization’s network of computers by assigning IP addresses to the client’s computers. As this process happens in automation, you do not need to do anything else apart from setting things up.
To install the DHCP server in Windows Server, follow these steps:
Open the Server Manager and click on Manage > Add Roles and Features.
Then, choose the Role-based or feature-based installation option and click the Next button.
Next, choose the desired server from the server pool. If you have only one server, simply click on the Next button.
Following that, select the DHCP Server checkbox and proceed with the Next and Add Features button.
Finally, click the Install button to initiate the installation process. After completion, you can close all the windows.
To install a DHCP server on Windows Server using PowerShell, here are the necessary steps:
For detailed information about the installation process, continue reading.
Begin by opening PowerShell with administrative rights. To do this, type powershell into the Taskbar search box, right-click the result, choose the Run as Administrator option, and confirm by clicking Yes.
After launching PowerShell, type the following command:
Let it be finished. Once done, you can close the PowerShell window.
To uninstall DHCP server from Windows Server, follow these steps:
Open the Server Manager on your computer and click on Manage > Remove Roles and Features.
Then, choose the server from the server pool and click on the Next button. Following that, remove the tick from the DHCP Server checkbox.
Once completed, a window will appear displaying all the DHCP tools present on your server. You can enlarge this list to see every tool. Then, press the Remove Features button.
This action will take you to the Features tab. Here, all you need to do is click the Next button.
Next, hit the Remove button in the subsequent confirmation window.
After completing these steps, close all open windows and reboot your server. Alternatively, you may select the Restart the destination server automatically if required checkbox before clicking the Remove button, as this will serve the same purpose.
To configure the DHCP server, open the Server Manager and opt for the Role-based or feature-based installation. Select your server from the server pool, check the DHCP Server option, and pick the features you wish to add. To complete the process, click the Install button. Alternatively, for setting this up via CLI, launch PowerShell as an administrator and input: Install-WindowsFeature DHCP -IncludeManagementTools.
How to install DHCP Server using powershell?
- Open PowerShell:
- Search for PowerShell in the taskbar, right-click the result, and select Run as Administrator.
- Install DHCP Feature:
- Execute the following command:
powershell
Install-WindowsFeature DHCP -IncludeManagementTools
- Wait for the installation to complete.
- Execute the following command:
How to Configure the DHCP Server?
After installation, configure the DHCP server by following these steps:
Using Server Manager:
- Open Server Manager.
- Go to Manage > Add Roles and Features.
- Select the DHCP Server role and configure the necessary features.
- Complete the wizard by clicking Install.
Using PowerShell:
- Open PowerShell as Administrator.
- Configure the DHCP role:
powershell
Add-DhcpServerInDC -DnsName <YourDomainName> -IPAddress <YourServerIP>
How to uninstall DHCP Server?
If you need to remove the DHCP server:
Using Server Manager:
- Open Server Manager:
- Go to Manage > Remove Roles and Features.
- Select the Server:
- Pick the server from the pool and click Next.
- Remove DHCP Role:
- Uncheck DHCP Server.
- Review the list of DHCP tools and click Remove Features.
- Complete the Process:
- Click Remove in the confirmation window.
- Optionally, select Restart the destination server automatically if required.
- Reboot:
- After the removal process, restart the server.
Using PowerShell:
- Open PowerShell as Administrator.
- Run the following command to uninstall:
powershell
Uninstall-WindowsFeature DHCP
Important Notes
- Enabling DHCP cannot be performed through CMD. Use PowerShell for command-line management.
- Ensure proper network configuration and firewall adjustments after setting up the DHCP server to avoid connectivity issues.
- Always test configurations in a controlled environment before deploying to production.
With these steps, you can effectively manage DHCP services on a Windows Server environment.
Enabling DHCP on Windows Server can’t be done using CMD. Instead, utilize PowerShell by searching for it in the Taskbar search box, right-click it, select Run as Administrator, and confirm with Yes. Input the following command: Install-WindowsFeature DHCP -IncludeManagementTools, and allow some time for the installation to finish.
ColoCrossing excels in providing enterprise Colocation Services, Dedicated Servers, VPS, and a variety of Managed Solutions, operating from 8 data center locations nationwide. We cater to the diverse needs of businesses of any size, offering tailored solutions for your unique requirements. With our unwavering commitment to reliability, security, and performance, we ensure a seamless hosting experience.
For Inquiries or to receive a personalized quote, please reach out to us through our contact form here or email us at sales@colocrossing.com.