Vieles rund um die EDV

DHCP Export

Export DHCP

Variante 1

Export

netsh dhcp server export c:dhcp.txt all
xcopy /y c:dhcp.txt servernamec$dhcp.txt

Import

netsh dhcp server import c:dhcp.txt all

 

Variante 2

Export:

Powershell-Datei mit folgendem Inhalt:

Remove-Item -Path D:\Backup\Dhcp\dhcpexp.xml -Force
Start-Sleep -s 15
Export-DhcpServer -ComputerName DC1 -Leases -File D:\Backup\Dhcp\dhcpexp.xml –verbose

Import:

Powershell-Datei mit folgendem Inhalt:

Import-DhcpServer –ComputerName DC1 -Leases –File D:\Backup\Dhcp\dhcpexp.xml -BackupPath D:\Backup\Dhcp\ –Verbose