Migrates folders, files, and associated permissions and share properties from a source server to a destination server through port 7000. The cmdlet Receive-SmigServerData must be run on the destination server at the same time Send-SmigServerData is running on the source server.
Windows Server · Risk: High · Documentation Verified
Last verified: 2026-10-26
Microsoft Microsoft.Windows.ServerManager.Migration reference: Migrates folders, files, and associated permissions and share properties from a source server to a destination server through port 7000. The cmdlet Receive-SmigServerData must be run on the destination server at the same time Send-SmigServerData is running on the source server. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for Send-SmigServerData. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Supported environments
Windows / Microsoft.Windows.ServerManager.Migration · Windows Server 2025 documentation; feature/module prerequisites apply
Parameters
-ComputerName (required)
Specifies the name or IP address of the destination server to which you want to copy data.
-Confirm
Prompts you for confirmation before running the cmdlet.
-DestinationPath (required)
Specifies the path on the destination server to which you want to copy data. To avoid migration failures, verify that the destination path you specify exists for share-only migration. For other migration types, verify that the path can be created on the destination computer. The path must be a valid local path. The path length cannot be longer than 246 characters. Wildcard characters are not supported.
-Force
Overwrites existing files automatically if the files that you are migrating from the source server are newer. Also overwrites existing shares' properties if the shares' names already exist on the source server.
-Include (required)
Specifies the type of content to copy to the destination server. The following are acceptable values for this parameter: - Data: Copies only files in the folder designated by the *SourcePath* parameter to the folder designated by the *DestinationPath* parameter. Subfolders and their content are not copied unless the *Recurse* parameter is added. - Share: Copies only the share properties assigned to the folder specified in the *SourcePath* parameter to the folder specified in the *DestinationPath* parameter. For example, if a folder was shared on the source server, it is shared on the destination server if the Share value is provided in the cmdlet, thereby preserving all share properties and permissions. Share properties for subfolders and their content are not copied unless the *Recurse* parameter is added. The files and subfolders in the folder designated by *SourcePath* are not migrated. To avoid migration failures, verify that the folder specified in the *DestinationPath* parameter (and all subfolders if the *Recurse* parameter is added) exists. - All: Copies both data and associated share properties.
-Password (required)
Specifies the password, as a secure string, to encrypt the data transfer by using the 256-bit advanced encryption standard (AES). The secure string can be obtained by entering the command Read-Host -AsSecureString or ConvertTo-SecureString. You must specify a password to protect your data because transferred data is broadcast over a network. If the *Password* parameter is not added to your command, you are prompted to specify a password after entering your command. The password length must be a minimum of six characters and a maximum of 260 characters.
-Recurse
Copies all content of the type specified by *Include* parameter in the path specified in the *SourcePath* parameter. If this parameter is not used, subfolders of the *SourcePath* are not copied.
-SourcePath (required)
Specifies the folder on the source server from which you want to copy data. To avoid migration failures, it is required that you first verify that the source path you specify exists on the source computer, except in the case of share-only migration. The path must be a valid local path. The path length cannot be longer than 246 characters. Wild card characters are not supported.
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Prerequisites
Windows with the Microsoft.Windows.ServerManager.Migration module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
Security considerations
This cmdlet changes system state. Review every target and parameter in the official reference, test outside production, and prepare an appropriate backup or rollback. Do not execute the example automatically.
Examples
Example 1: Send files
Send-SmigServerData -Include Data -ComputerName "Server2" -SourcePath "c:\users" -DestinationPath "d:\shares\users" -Verbose
This sample command migrates all files from the folder c:\users on the local (source) computer to the folder d:\shares\users on the destination computer. By default, subfolders in c:\users are not transferred. The command uses the computer name Server2, as provided in the *ComputerName* parameter, to find the destination server in the subnet. Because a password is not provided in this sample command, after entering the command, the user is prompted to enter a password for encrypting the migrated data. Password characters are displayed as asterisks (*).When the password is entered, the value is passed to the command as a SecureString. By using the *Verbose* parameter, the command also displays detailed information about the migration operation. Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.