Thursday, January 16, 2014

Part 2–: PowerShell and DHCP : DHCP Post-Install Configuration

Part – 1 : PowerShell and DHCP : Installing DHCP Server Role on Server 2012

Doing Post-Install Configuration tasks

In my previous post, we go through the steps for installing the DHCP Server role on our windows server 2012. In this post we are going to do the DHCP Post Configuration tasks, which contains two steps for a standalone (Workgroup) server.
1.       Creating Security Groups
a.       DHCP Administrators
b.      DHCP Users
2.       Supressing the post-install configuration alert.

Note: I am running a non-domain server, which is just a standalone workgroup computer, if you want to do post-installation configuration on domain joined server, than the few steps are different as per compared to the workgroup server.

After installing the DHCP server roles, we have to complete the DHCP Server Post installation tasks. 

So, when you open the server manager console, you will see the below warning error, “Configuration required for DHCP Server at DHCP-Server1.


When you click on it, it will ask you to complete an action to Complete DHCP Configuration.

When you click on “Complete DHCP configuring”, you will see that it will ask to create 2 Security groups, one is “DHCP Administrators” and another one is “DHCP Users”.
Now Click on Cancel, yes on Cancel and go back to our PowerShell Console.


As, I told you before, that we will try to configure DHCP Server using PowerShell as much as we can.

Note : With Server 2012 R2, you can use the Add-DHCPServerSecurityGroup to add the two groups.No need to manually add them using ADSI! (Thanks to Sir Thomas Lee for suggestions.

Now, run the below script and then open Local users and Groups.

# Creating a group for DHCP Server
   # This Step is required for WorkGroup only server,
   # If your server is joined to the Domain, this steps are not valid.

$objectOU = [ADSI]"WinNT://$env:COMPUTERNAME"
$group = $objectOU.Create("Group","DHCP Users")

$groupAdmin = $objectOU.Create("Group","DHCP Administrators")


Once you run the above script, you, can see that desired groups are created.


But, when you open Server Manager Console again you will see the same error again.


To supress this error, we need to change a registry settings, and then we need to restart the DHCP Server Service.
Run the below command to change the Registry value, to change the registry value, run the below command.

Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\ServerManager\Roles\12 -Name ConfigurationState -Value 2


Now, restart the DHCP Server Service.
Restart-Service -Name DHCPServer –Force


Now, open Server Manager again, and you can see there are not errors related to “DHCP Server Post Configuration”.

That’s all.
Now our POST configuration task is done, now next we have to start configuring the server…

Aman Dhally
clip_image017 clip_image018 clip_image019 clip_image020  clip_image021


  1. With Server 2012 R2, you can use the Add-DHCPServerSecurityGroup to add the two groups.No need to manually add them using ADSI!

    1. Sir Thomas, WOW!!!

      It's an honour to see your suggestion on my blog. WOW !!!!! Thanks a lot for suggestion Sir, I think I am using Server 2012 Standard Edition, that's why I am not able to see that CMDLET

      Thanks a lot Sir.


    2. Good post...!
      But in case of server joined to a domain or DC ,
      what are the steps for DHCP Administrator....?


    3. This comment has been removed by the author.

    4. The effectiveness of IEEE Project Domains depends very much on the situation in which they are applied. In order to further improve IEEE Final Year Project Domains practices we need to explicitly describe and utilise our knowledge about software domains of software engineering Final Year Project Domains for CSE technologies. This paper suggests a modelling formalism for supporting systematic reuse of software engineering technologies during planning of software projects and improvement programmes in Final Year Project Centers in Chennai.

      Software management seeks for decision support to identify technologies like JavaScript that meet best the goals and characteristics of a software project or improvement programme. JavaScript Training in Chennai Accessible experiences and repositories that effectively guide that technology selection are still lacking.

      Aim of technology domain analysis is to describe the class of context situations (e.g., kinds of JavaScript software projects) in which a software engineering technology JavaScript Training in Chennai can be applied successfully


  2. windows 10 activated 32 bit , windows 10 serial key free , cheap office 2016 series key , windows 10 serial key generator , key genuine windows 8 enterprise , windows 10 key sale , windows anytime upgrade key home basic to professional , cheap windows 7 pro , l8kDv4

    buy office 2016 product key

    windows server 2012 r2 free

    rosetta stone french key sale

    windows 10 product serial number offer