Friday, February 14, 2014

Part – 5 :PowerShell and DHCP : Getting Information on leased IP Addresses



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

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

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

Part – 4 :PowerShell and DHCP :   Setting DHCP server’s “Server Options”



Information and Reporting on DHCP Server.

In my previous post we had configured DHCP server’s “Server Options”.

Now our basic DHCP server is fully functional and providing the IP address to the dhcp clients.

Our next step is gathering information of the DHCP clients and the IP addresses leased by the server.


Check DHCP server Statistics

To get the quick statistics of the DHCP server, we can use the                                                         Get-DhcpServerv4Statistics” cmdlet and it will show us the quick statistics of the server.  

In these statistics you can see the total number of used and free IP address available.




IP Address leases

To check the leased IP address those are given to the DHCP clients by DHCP server, we can use the “Get-DhcpServerv4Lease” cmdlet.

To use this cmdlet we have to use –ScopeID parameter. In our case ,our scope id is “”

Get-DhcpServerv4Lease -ScopeId  -AllLeases





Getting list of available free IP Addresses


To know about next available free IP Address we can use                                                   Get-DhcpServerv4FreeIPAddresscmdlet.

Just run the cmdlet with –scopeID parameter and if you want to know the list 10, or 50 next of available free IP then you can use the – NumAddress parameter.

By running the below command we can see the next 10 available free IP addresses for the scope id of

Get-DhcpServerv4FreeIPAddress -ScopeId -NumAddress 10



That’s all for now. See you in our next blog post.


Aman Dhally

clip_image017 clip_image018 clip_image019 clip_image020  clip_image021

No comments:

Post a Comment