kantver - Fotolia


Windows Server Migration Tools make file share moves less taxing

Administrators can hit a few snags when migrating a Windows file server, but a free Microsoft utility and some PowerShell know-how make the changeover a painless procedure.

A common administrative task is a file server migration. But this regular task isn't without issues if administrators...

do not plan in advance or follow appropriate procedures. Without these safeguards, the file server migration can result in broken NTFS or share permissions or even lost files. Administrators should follow and test a specific procedure to execute a trouble-free file server migration.

A file server can feature many different functions that need to move, such as file shares, Distributed File System namespaces and BranchCache. However, the most common scenarios involve migrating file shares and all files with permissions. To do the heavy lifting for this task, Microsoft offers a set of PowerShell cmdlets called the Windows Server Migration Tools. This utility eases the migration process -- moving a number of Windows roles, features and various operating systems to a new server.

How to install Windows Server Migration Tools

To get started, install the Migration Windows feature on the destination server. Open a PowerShell console and run Install-WindowsFeature –Name Migration to execute the Windows Server Migration Tools installation; this will add the required tools.

Next, create a deployment folder on the destination server with the smigdeploy.exe utility that came from the Windows Server Migration Tools snap-in. Specify a few key attributes to create the folder; the syntax of the command is:

C:\Windows\System32\ServerMigrationTools\SmigDeploy.exe /package /architecture amd64 /os WS08R2 /path <deployment folder path>

Ensure that the architecture and OS match the source server. To verify this, query Windows Management Instrumentation.

WMI query
Execute a Windows Management Instrumentation query to make sure the type of CPU and operating system on the servers match.

The /os parameter can be WS03, WS08, WS08R2 or WS12 for Windows Server 2003, Windows Server 2008, Windows Server 2008 R2 and Windows Server 2012, respectively. The /architecture switch can be amd64 or x86 for an AMD or Intel processor. The example below shows that the source server is a 64-bit machine with an AMD processor running Windows Server 2008 R2.

Deployment folder
The administrator details the parameters and executes the server migration deployment utility to create the deployment folder on the destination server.

After the command creates the deployment folder on the destination server, transfer the contents of this folder to the source server. After that, use Remote Desktop Protocol to connect to the source server and run the smigdeploy.exe utility located in C:\<DeploymentFolder>\SMT_<OS>_<Architecture>. This will open a PowerShell console session and execute.

When the utility has finished, go back to the destination server and enable the server to receive the deployment data. To do this, use the existing PowerShell console window or open up a new console as the administrator and enable the PSSnapin:

Add-PsSnapin microsoft.windows.servermanager.migration

This command makes all the PowerShell cmdlets available. Next, run Receive-SmigServerData. This will open the connection on the destination server so the source server can send the data. This will be open for approximately five minutes.

Windows Server 2016 features focus on evolving IT landscape

SearchWindowsServer talks with cloud architect Thomas Maurer about Windows Server 2016, Docker containers, Storage Spaces Direct and more.

Next, on the source server, send the data to the destination server. To do that, use the Send-SmigServerData cmdlet in the PowerShell console. The SourcePath is the deployment folder that was copied from the destination server; the destination path is a local folder anywhere on the destination server where the deployment files will live.

Send-SmigServerData -ComputerName <DestinationServer> -SourcePath <SourceDeploymentFolder> -DestinationPath <DestinationDeploymentFolder> -Include All –Recurse

At the password prompt, enter the password that was provided when running Receive-SmigServerData on the destination server.

When this command completes, all files and every share should be transferred to the destination server. Make sure all shares were recreated on the destination server by running Get-SmbShare in a PowerShell console.

Check Microsoft documentation for a full breakdown of almost every feature installed on the source server and how to migrate those features to a new server.

Next Steps

Is it time to migrate to Windows Server 2016?

Windows Server 2016 rolling upgrade feature aims to ease cluster updates

Find and fix Windows Server file share copy problems

Dig Deeper on Windows Server storage management