Microsoft Windows Server 2012 DHCP

By | September 30, 2014

Scenario

I have 4 dhcp server (in 2 failover cluster) running in Windows Server 2012 R2 with Mac filter enabled.

Problem

Failover cluster will not synchronize Mac filter database, for adding new record we have to do it manually in all dhcp server.

Solution

PowerShell script to add Mac filter to multiple server
[code language=”powershell”]$mac = Read-Host ‘ENTER MAC ADDRESS’
$des = Read-Host ‘ENTER DESCRIPTION’
Add-DhcpServerv4Filter -List Allow -MacAddress $mac -Description $des -ComputerName dhcp01.domain.local -Verbose
Add-DhcpServerv4Filter -List Allow -MacAddress $mac -Description $des -ComputerName dhcp02.domain.local -Verbose
Add-DhcpServerv4Filter -List Allow -MacAddress $mac -Description $des -ComputerName dhcp03.domain.local -Verbose
Add-DhcpServerv4Filter -List Allow -MacAddress $mac -Description $des -ComputerName dhcp04.domain.local -Verbose
[/code]

Loading