Windows Server 8 – Now with PowerShell Cmdlets for DHCP

*****Warning. This is from a preview release******

In Windows Server 2008 R2 there were a number of modules included for managing typical server roles such as Active Directory, Failover Clustering etc. However, there were some noteable absentees, such as DHCP server.

You may ask why am I highlighting PowerShell cmdlets for DHCP, well:

  1. Fellow London VMUG regular Julian Wood commented on my PowerShell v3 First Look Post asking if there were DHCP cmdlets this time.
  2. Whether there are or not this time would indicate how cmdlet coverage is progressing.

So after firing up Windows Server Developer Preview it was good to see that there are now cmdlets for DHCP Server.

Firstly, add the DHCP Server Role:


Add-WindowsFeature DHCP

…and take a look at the DHCP server module.


Get-Module *DHCP* -ListAvailable

Now, let’s see how many cmdlets we have in that module:


(Get-Command -Module DHCPServer).count

103!

So, let’s have a look at what kind of things we can do.


Get-Command -Module DHCPServer

Let’s try adding a new scope:


Add-DHCPServerv4Scope -Name "Test Scope" -StartRange 192.168.100.50 -EndRange 192.168.100.100 -SubnetMask 255.255.255.0

Now it’s also easy to report on that scope:


Get-DhcpServerv4Scope | Format-List *

The presence of the DHCP Server module is a good indicator that it is now pretty hard to ship a component of Windows Server without adding PowerShell support.

Hopefully 103 DHCP Server cmdlets is enough to make Julian happy :-)

Update:

Julian mentions in the comments about DHCP failover and loadbalancing. Haven’t had time to play with the technologies yet, but this might be a good indicator:

7 thoughts on “Windows Server 8 – Now with PowerShell Cmdlets for DHCP

  1. Great, this is really enhancing completely integrated management of all MS technologies with PowerShell. Me thinks you will be busy with all the new features!

    Now, I hope they actually delivery DHCP Server load balancing and failover.

  2. Yep, it’s looking good :-)

    Updated the post with a sneak peek at Set-DhcpServerv4Failover. No description, but hopefully that will be along the lines of what you are looking for…….

  3. At last! Can it really be true? Something I’ve been asking for since Windows 2000. Excellent news indeed! Trying to manage any but the smallest installation using the gui is painful, even using crude scripts based upon manipulating NETSH. Looking forward to getting my life back.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>