Export and import DHCP filter MAC addresses

Since Windows Server 2008 R2, there is a function within the DHCP role to allow or block MAC addresses. In the latter case, this means that no more IP is assigned to you by blocked devices.

If you want to transfer this list of MAC addresses to another DHCP server, you will find that there is unfortunately no entry in the context menu to be able to export the addresses.


This is, however, with two lines PowerShell super easy and fixed by Statten. However, Windows Server 2012 R2 requires this.

Opens the PowerShell console on the DHCP server from which you want to export the MAC addresses. Enter the following command:

Get-DhcpServerv4Filter|Export-Csv C:\temp\dhcp-mac-filter.csv

Copies the CSV file created under C: \ temp (or your own path) to the second DHCP server to a corresponding location.
Opens the PowerShell console again on the Windows computer you want to import into. And enter the following command.

Import-Csv C:\temp\dhcp-mac-filter.csv|Add-DhcpServerv4Filter

That’s it. Look in the DHCP console. Your exported entries should now be there.