Monday, January 20, 2014

Part–3 : PowerShell and DHCP : Configuring the DHCP Scope DHCP Server



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

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



In my previous post, we do the Post-Install configuration task for the DHCP Server.  Now it’s time to configure the DHCP Sever Scope. We can going to do the below configuration.



DHCP Configuration





IP Address Scope

DNS Server







Domain Name



Subnet Mask



We configure our DHCP server to give us the automatic IP Address from Range to  Subnet mask  is “” our Gateway’s IP Address is and the IP Address of our DNS Server is “”, and as a domain name for DHCP IP, I am using



Before setting scopes, I want to bind the specific LAN card for DHCP Server ( as I have 2 LAN cards on my server), I don’t want to run DHCP server service on all of My LAN Cards,  to do that, I can use “Set-DhcpServerv4Binding” cmdlet.

You can see I have 2 Ethernet cards on my machine, and I want to run the DHCP server on the LAN card named as “for_dhcp”.  

Note: I renamed this LAN card manually, from “Local Area Network” to “for_dhcp”.

Now run the below command.

Set-DhcpServerv4Binding -InterfaceAlias "for_dhcp" -BindingState $true



Once it done, let cross check it by running the Get-DhcpServerv4Binding cmdlet.



Perfect, the Ethernet is bind.


Setting Scope.


Now, we have to set a scope for the DHCP Server, so that he can start giving us the IP addresses.

$nameScope = 'DHCP Delhi'

$startIP = ''

$endIP = ''

$subnetMask = ''

For my ease, I set my settings is variable, so that is easy to change later on {idea for scripting } , and save them as a script file for later use.

Above, I am setting the name of the scope to “DHCP Delhi” and the DHCP server start leasing the IP Address from “” to end IP address of “”. and my subnet mask will be “”.

We have to set all of above using the “Add-DhcpServerv4Scope” cmdlet.

Now, Once you set the variable, run the below command. By using –State parameter to True, we are making this scope active.

Add-DhcpServerv4Scope -Name $nameScope -StartRange $startIP -EndRange $endIP -SubnetMask $subnetMask -State Active


Add-DhcpServerv4Scope -Name 'DHCP Delhi'-StartRange '' -EndRange $'' -SubnetMask ''-State Active



Once the above command run successfully, open your DHCP Server Manager and you can see that we have a new scope and that scope it Active.



Even our DHCP Sever is started giving the address to other laptop on the network too.



And I run Ipconfig /release and then Ipconfig /renew on another laptop and he gets the IP address from our server too.



Now, when you open the console, you can see our DHCP Server has given 2 ips to the computers.

Great J Isnt’



Till, now , we are successfully able to get the IP address on client system from our DHCP Server, But we won’t able to connect to Internet or other services, until we configure the Router and DNS options in the DHCP Server,

In our next blog post we are going to do that.

See you in my next blog post.



Aman Dhally
clip_image017 clip_image018 clip_image019 clip_image020  clip_image021

1 comment:

  1. 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