EXPORT:
1. PowerShell Export (Recommended by Microsoft)
Exports full DHCP configuration and leases to an XML file.
Export-DhcpServer -ComputerName <DHCPServerName> -File “C:\DHCP\dhcp-export.xml” -Leases
• Replace with your server name (or use ).
• Add if you want to export only a specific scope.
2. NETSH Export (Legacy, still works)
If you prefer the classic command prompt method:
netsh dhcp server export C:\dhcp.txt all Worked
• Exports all scopes and leases to a text file.
• Useful for quick backups or migrations.
IMPORT:
Importing a Windows DHCP Server Export
1. PowerShell Import (Recommended) Use this if you exported with Export-DhcpServer
Import-DhcpServer -ComputerName <DHCPServerName> -File “C:\DHCP\dhcp-export.xml” -BackupPath “C:\DHCP\Backup” -Leases
Notes:
• can be if running locally.
• must be an existing folder.
• imports active leases along with scopes and reservations.
• This method supports DHCP Failover, Policies, IPv6, etc.
2. NETSH Import (Legacy Method) Worked.
Use this if you exported with: netsh dhcp server export C:\dhcp.txt all
netsh dhcp server import C:\dhcp.txt all
Comments are closed