1 out of 1 rated this helpful - Rate this topic

Send-SmigServerData

Send-SmigServerData

Migrates folders, files, and associated permissions and share properties from a source server to a destination server through port 7000. The destination server must be in the same subnet as the source server, and the cmdlet Receive-SmigServerData must be run on the destination server at the same time Send-SmigServerData is running on the source server.

Syntax

Send-SmigServerData [-Force] [-Recurse] -ComputerName <string> -DestinationPath <string> -Include <All | Data | Share> -Password <SecureString> -SourcePath <string> [-confirm] [<CommonParameters>]

Detailed Description

Migrates folders, files, and associated permissions and share properties from the local server to a destination server through port 7000. The destination server must be in the same subnet as the source server. The cmdlet Receive-SmigServerData must be started on the destination server to receive data. By default, the cmdlet Send-SmigServerData can wait for a maximum of five minutes to establish a connection with the cmdlet Receive-SmigServerData on the destination server. See the Note about migration-related registry keys to learn how to change the default maximum connection time by using a registry key. File access permissions are maintained during the migration so that the same set of users is able to access files on the destination server after they have been migrated. Because files are sent by using an encrypted connection, a password must be provided to encrypt and decrypt migrated files on both the source and destination servers. Transporting encrypted files (EFS) and junction points are not supported.

Parameters

-ComputerName <string>

Specifies the name of the destination server to which you want to copy data. The destination server must be in the same subnet as the source server.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-DestinationPath <string>

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. Wild card characters are not supported.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-Force <SwitchParameter>

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.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-Include <All | Data | Share>

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.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-Password <SecureString>

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 transfered 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 6 characters and a maximum of 260 characters.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-Recurse <SwitchParameter>

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.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-SourcePath <string>

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.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-Confirm <SwitchParameter>

Prompts you for confirmation before executing the command.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-WhatIf <SwitchParameter>

Describes what would happen if you executed the command without actually executing the command.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-CommonParameter

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see About Common Parameter

Input and Return Types

The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.

Input Type

.

Return Type

Microsoft.Windows.ServerManager.Migration.Commands.MigrationResult []. A MigrationResult object contains basic information about the success or failure of a requested migration item.

Notes


  • The Windows Server Migration Tools deployment log file is located in %windir%\Logs\SmigDeploy.log. Other Windows Server Migration Tools log files are created at the following locations:
    - %windir%\Logs\ServerMigration.log
    - On Windows Server 2008 and Windows Server 2008 R2: %localappdata%\SvrMig\Log
    - On Windows Server 2003: %userprofile%\Local Settings\Application Data\SvrMig\Log

    If the log files cannot be created at these locations, ServerMigration.log and SmigDeploy.log will be created at %temp%, and other logs will be created at %windir%\System32.

    The maximum size of all log files (in MB) is stored in the following registry key. When the log file grows larger than the size specified in the registry key, the log file is deleted. Logging begins again in a new log file that uses the same file name and path. The default maximum log size is 200 MB.
    - Key: HKLM\Software\Microsoft\ServerMigration
    - Value: MaxLogSize (REG_DWORD)
    - Data: Whole numbers between 1 and 1000 (represents log size, in MB)

    The maximum connection time for Send-SmigServerData and Receive-SmigServerData cmdlet is stored in the following registry key. Send-SmigServerData and Receive-SmigServerData operations terminate if a connection cannot be established within the specified time. The default maximum connection time is 300 seconds, or 5 minutes.
    - Key: HKLM\Software\Microsoft\ServerMigration
    - Value: MaxConnectionTime (REG_DWORD)
    - Data: Between 1 and 3600 (represents connection time, in seconds). If a value larger than 3600 is specified, 3600 seconds is used as the maximum connection time.


Examples

EXAMPLE 1

C:\PS>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.

EXAMPLE 2

C:\PS>$pass = convertto-securestring -string "password" -asplaintext -force 

C:\PS>Send-SmigServerData -include Share -ComputerName "Server2" -SourcePath "c:\users" -DestinationPath "d:\shares\users" -Recurse -Password $pass -Verbose

Description

-----------

In this example, the first line of the command instructs the migration utilities to convert the data encryption password, represented by "password," to a secure string, and store it in the variable $pass.

The second sample command migrates only share status and permissions for folder c:\users and for all subfolders by using the -Include Share and the Recurse parameters. The files and subfolders in folder c:\users are not migrated. This command also sets the value of the variable $pass, specified in the first command, as the password to encrypt the data transfer. The command uses the computer name Server2, as provided in the ComputerName parameter, to find the destination server in the subnet.

By using the -Verbose parameter, the command also displays detailed information about the migration operation.

EXAMPLE 3

C:\PS>Send-SmigServerData -include All -ComputerName "Server2" -SourcePath "c:\users" -DestinationPath "d:\shares\users" -Recurse -Password (Read-Host "Enter a Password:" -AsSecureString) -Verbose

In this example, the first line of the command instructs the migration utilities to convert the data encryption password, represented by "password," to a secure string, and store it in the variable $pass.

The second sample command migrates only share status and permissions for folder c:\users and for all subfolders by using the -Include Share and the Recurse parameters. The files and subfolders in folder c:\users are not migrated. This command also sets the value of the variable $pass, specified in the first command, as the password to encrypt the data transfer. The command uses the computer name Server2, as provided in the ComputerName parameter, to find the destination server in the subnet.

By using the -Verbose parameter, the command also displays detailed information about the migration operation.

See Also

Reference

Receive-SmigServerData

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.