TechShizz | Migrating Server Roles with SmigDeploy

Migrating Server Roles with SmigDeploy

Get-WindowFeature - Name migration

Install-WindowsFeature -Name migration

cd \windows\system32\servermigrationtools

.\smigdeploy.exe /package /architecture /amd64 /os WS12R2 /path C:\Migration

#copy the Smig files to the Source Machine
Copy-Item -Path C:\Migration\SMT_ws12r2_amd64 -Destination \\srv2012-lab\c$\Migration

.NET 3.5 is required on the source machine for this to work, so the first step (if it is not already installed) is to install it.

#Check is .NET3.5 is installed
Get-WindowsFeature -Name net-framework-core

#Install .NET 3.5 if required. You will need a 2012R2 ISO mounted for the source files

Install-WindowsFeature net-framework-core -source D:\sources\sxs

#Import smig cmdlets into session
Add-PSSnapin Microsoft.Windows.ServerManager.Migration

#Stop DHCP (the role we're migrating)
Stop-Service -Name DHCP

#View roles and features eligible for migration
Get-SmigServerFeature

#Export the migration data
Export-SmigServerSetting -FeatureID DHCP -Path c:\migration\DHCPMigration -verbose

#Finally copy this exported data back over to the target server
Copy-Item -Path C:\migration\DHPCMigration -Destination \\srv2016-lab\c$\migration

Back over on the Target server we now need to Import the settings

#Import smig cmdlets into session
Add-PSSnapin Microsoft.Windows.ServerManager.Migration

#Install DHCP role and import settings
Import-SmigServerSetting -FeatureID DHCP -Path C:\migration\DHCPMigration -verbode -force

 

Add comment