La bitácora de rodri

febrero 5, 2015

Quick and Simple way to migrate DHCP Scope from W2008 to W2012

Filed under: Windows 2012 — Etiquetas: , — xavier Rodriguez @ 5:11 pm

Windows Server 2012 and Windows Server 2012 R2 has new DHCP cmdlets which include export and import tasks based on PowerShell.

  • Export-DhcpServer
  • Import-DhcpServer

To export the DHCP server configuration, scopes and leases from a Windows Server 2008, Windows Server 2008 R2 or Windows Server 2012 to Windows Server 2012 R2, run the following command from the Windows Server 2012 R2 powershell console.

Export-DhcpServer –ComputerName “mycurrentdhcpserver.mydomain.com” -Leases -File C:\dhcpexp.xml -verbose

If you do not want export lease information, do not include –Leases switch.

Once the export task is finish Stop the DHCP service in the current DHCP server (mycurrentdhcpserver.mydomain.com)

Net stop dhcpserver

Install DHCP Server role on your NEW Windows Server 2012 R2.

Install-WindowsFeature -IncludeManagementTools dhcp

To import DHCP server configuration to Windows Server 2012 R2, run the following command from the Windows Server 2012 R2 powershell console.

Import-DhcpServer –ComputerName “myNEWdhcpserver.mydomain.com” -Leases –File C:\dhcpexp.xml -BackupPath D:\dhcp\backup\ -Verbose

Deja un comentario »

No hay comentarios aún.

RSS feed for comments on this post.

Deja un comentario

Este sitio utiliza Akismet para reducir el spam. Conoce cómo se procesan los datos de tus comentarios.

Crea un blog o un sitio web gratuitos con WordPress.com.