An Engineers Notebook

Migrating Server Roles with SmigDeploy

Get-WindowFeature - Name migration
Install-WindowsFeature -Name migration
cd windowssystem32servermigrationtools
.smigdeploy.exe /package /architecture /amd64 /os WS12R2 /path C:Migration
#copy the Smig files to the Source Machine
Copy-Item -Path C:MigrationSMT_ws12r2_amd64 -Destination \srv2012-labc$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:sourcessxs
#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:migrationDHCPMigration -verbose
#Finally copy this exported data back over to the target server
Copy-Item -Path C:migrationDHPCMigration -Destination \srv2016-labc$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:migrationDHCPMigration -verbode -force

 

Leave a Reply

Your email address will not be published.