This article address the issue that occurs in the following scenario:
Assume that you try to migrate a Windows Server 2008 R2-based Dynamic Host Configuration Protocol (DHCP) server to a Windows Server 2012 or Windows Server 2012 R2-based DHCP server by using Windows PowerShell scripts. When you try to import the active (dynamic, non-reserved) leases on the target server, the svchost.exe process that hosts the DHCP Server service crashes.
Additionally, you receive the following Error events that have event ID 1000 in the Application log and event ID 7031 in the System log:
Note The tldhcp03.XXXXXX.YYYYYYYYYYYYY-ZZ.de placeholders in the event logs are the FQDN of the target DHCP server.
Assume that you try to migrate a Windows Server 2008 R2-based Dynamic Host Configuration Protocol (DHCP) server to a Windows Server 2012 or Windows Server 2012 R2-based DHCP server by using Windows PowerShell scripts. When you try to import the active (dynamic, non-reserved) leases on the target server, the svchost.exe process that hosts the DHCP Server service crashes.
Example
For example, you run the following PowerShell scripts:
Note Deleting active leases (dynamic leases) results in a successful import operation when importing the data by using the same cmdlets. Active reservations with leases are kept, and the DHCP Server service does not crash.
$dhcpServerSource1 = "server00000001.XXXXXX.YYYYYYYYYYYYY-ZZ.de" # current 80%Then, you try to import the file (including active dynamic leases) by using the fully qualified domain name (FQDN):
$dhcpServerSource2 = "server00000002.XXXXXX.YYYYYYYYYYYYY-ZZ.de" # current 20%
$dhcpServerTarget1 = "tldhcp03.XXXXXX.YYYYYYYYYYYYY-ZZ.de" # future 95%, Active
$dhcpServerTarget2 = "tldhcp04.XXXXXX.YYYYYYYYYYYYY-ZZ.de" # future 5%, Hot Standby
$folderDhcpMigrationConfigurationBackup = <path of the backup folder>
Export-DhcpServer -computername $dhcpServerSource1 -Leases -File "$folderDhcpMigrationConfigurationBackup\DHCPServerExportIncludingLeases_$dhcpServerSource1.xml" –Verbose
Import-DhcpServer -ScopeOverwrite -Force -ComputerName $dhcpServerTarget1 -Leases -File "$folderDhcpMigrationConfigurationBackup\DHCPServerExportIncludingLeases_$dhcpServerSource1.xml" -BackupPath "$folderDhcpMigrationConfigurationBackup" -VerboseIn this example, the DHCP Server service crashes during the import operation. The crash occurs at exactly the moment in which the active dynamic lease is imported. The remaining data cannot be imported because of the crash. You have to re-start the service in order to work with DHCP again.
Note Deleting active leases (dynamic leases) results in a successful import operation when importing the data by using the same cmdlets. Active reservations with leases are kept, and the DHCP Server service does not crash.
Additionally, you receive the following Error events that have event ID 1000 in the Application log and event ID 7031 in the System log:
Event ID 1000 in Application log
Event ID 7031 in System log