Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic

Import-SmigServerSetting

Updated: November 20, 2013

Applies To: Windows Server 2008 R2

Import-SmigServerSetting

Imports selected Windows features, and operating system settings from a migration store, and applies them to the local computer.

Syntax

 

Import-SmigServerSetting [-Feature <Feature[]>] [-Force] [-Group] [-IPConfig <All | NIC | Global>] [-SourcePhysicalAddress <string[]>] [-TargetPhysicalAddress <string[]>] [-User <All | Enabled | Disabled>] [-WhatIf] -Password <SecureString> -Path <string> [-confirm] [<CommonParameters>]
  • Feature

  • Force

  • Group

  • IPConfig

  • SourcePhysicalAddress

  • TargetPhysicalAddress

  • User

  • WhatIf

  • Password

  • Path

  • confirm

 

Import-SmigServerSetting [-FeatureId <string[]>] [-Force] [-Group] [-IPConfig <All | NIC | Global>] [-SourcePhysicalAddress <string[]>] [-TargetPhysicalAddress <string[]>] [-User <All | Enabled | Disabled>] [-WhatIf] -Password <SecureString> -Path <string> [-confirm] [<CommonParameters>]
  • FeatureId

  • Force

  • Group

  • IPConfig

  • SourcePhysicalAddress

  • TargetPhysicalAddress

  • User

  • WhatIf

  • Password

  • Path

  • confirm

Detailed Description

Imports selected Windows features and operating system settings from a migration store identified in the Path parameter, and applies them to the local computer. Before running this cmdlet, you must first use the Export-SmigServerSetting cmdlet to export Windows features, and settings from a source server to the migration store. The order in which settings are applied is not guaranteed. To migrate settings that must be migrated in sequential order, run the Import-SmigServerSetting cmdlet multiple times to apply the settings in the required order. You can also use this cmdlet to install Windows features and their dependencies, if the Windows features you are migrating have not been installed. Some Windows features might require that the destination computer be restarted to complete installation. After restarting the computer, you must run the cmdlet again with -Force parameter to complete the import operation.

Parameters

Feature

Specifies the Windows feature objects that you want to import from the migration store. Not all Windows features can be migrated by using migration cmdlets. You can use the Get-SmigServerFeature cmdlet to retrieve a list of Windows features that can be migrated from the migration store to the destination server, and pass the resulting list to the Import-SmigServerSetting cmdlet, either by piping the results to the cmdlet, or by storing the results in a variable and then using the variable to represent the results in your command.

This cmdlet also installs Windows features and their dependencies, if the features you are migrating have not been installed. Some Windows features might require that the destination computer be restarted to complete installation. After restarting the computer, you must run the cmdlet again with -Force parameter to complete the import operation.

Default Value:

Data Type: Feature[]

Attributes

 

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

true

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

 

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

true

variableLength

FeatureId

Specifies the IDs of the Windows features that you want to import from the migration store. Not all Windows features are supported for migration. You can use the Get-SmigServerFeature cmdlet to retrieve a list of Windows features, along with their feature IDs, that can be migrated from the migration store to the destination server. Separate multiple feature IDs by using commas. Standard Windows PowerShell wildcard characters are supported.

This cmdlet also installs Windows features and their dependencies, if the features you are migrating have not been installed. Some Windows features might require that the destination computer be restarted to complete installation. After restarting the computer, you must run the cmdlet again with -Force parameter to complete the import operation.

Default Value:

Data Type: string[]

Attributes

 

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

true

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

 

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

true

variableLength

Force

Specifies that imported settings overwrite existing Windows feature settings on the destination computer. If this parameter is not used, by default, existing Windows feature settings on the destination computer are preserved.

Default Value:

Data Type: SwitchParameter

Attributes

 

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

 

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Group

Imports the local groups and their memberships from the migration store. If a group already exists on the destination server, it is not overwritten. Group memberships from the source server are added to existing groups on the destination server, and the existing group memberships on the destination server are preserved.

Default Value:

Data Type: SwitchParameter

Attributes

 

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

 

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

IPConfig

Imports the source server's basic IP configuration settings. The following are acceptable values for this parameter:
- NIC: network interface card (NIC) IP configuration settings such as connection-specific suffix, IPv4 settings and Disable IPv6 Component registry key. IP configuration can only be imported for a NIC if it is enabled and connected to the network. You must restart your computer for disabling IPv6 components to take effect.
- Global: Windows IP configuration settings for the local computer
- All: both NIC and Global settings

Default Value:

Data Type: All | NIC | Global

Attributes

 

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

 

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

Password

Specifies the password, as a secure string, to decrypt the migration store. The secure string can be obtained by entering the command Read-Host -AsSecureString or Convertto-Securestring. Because the Password parameter is required, if it is not added to your command, you are prompted to specify a password after entering your command.

Default Value:

Data Type: SecureString

Attributes

 

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

 

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

Path

Specifies the path to the migration store from which you want to import Windows features and operating system settings. The path must be a well-formed local or Universal Naming Convention (UNC) path; if it is a share on a remote computer, the share must be notated as a drive letter on the local computer. The path length cannot be longer than 246 characters. Wildcard characters are not supported. Because the Path parameter is required, if it is not added to your command, you are prompted to specify a path after entering your command.

Default Value:

Data Type: string

Attributes

 

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

 

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

SourcePhysicalAddress

Specifies, in double quotations, the physical addresses of the source network interface cards (NICs) from which to import IP settings. To specify multiple source physical addresses, use commas to separate each address. The number of source physical addresses must be the same as the number of destination physical addresses specified in the TargetPhysicalAddress parameter. Wildcard characters are not supported. This parameter is required when migrating NIC or all IP configurations.

Default Value:

Data Type: string[]

Attributes

 

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

true

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

 

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

true

variableLength

TargetPhysicalAddress

Specifies, in double quotations, the physical addresses of the destination network interface cards (NICs) to which you want to apply IP settings. If you specify multiple destination physical addresses, use commas to separate each address. The number of destination physical addresses must be the same as the number of source physical addresses specified in the SourcePhysicalAddress parameter. Wildcard characters are not supported. This parameter is required when migrating NIC or all IP configurations.

Default Value:

Data Type: string[]

Attributes

 

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

true

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

 

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

true

variableLength

User

Specify the type of local user accounts to import from the migration store. The following are acceptable values for this parameter:
- Enabled: import only enabled local users
- Disabled: import only disabled local users
- All: import both enabled and disabled local users

User passwords are not migrated. Users must create a password the first time they log on to the server. Only the "User Name" and "Account is Disabled" properties are migrated.

Default Value:

Data Type: All | Enabled | Disabled

Attributes

 

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

 

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

WhatIf

Displays a preview of the results of an Import-SmigServerSetting command without carrying out the import operation. This parameter is only supported for importing Windows features. You cannot use the -WhatIf parameter to preview migration of other operating system settings.

Default Value:

Data Type: SwitchParameter

Attributes

 

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

 

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Confirm

Prompts you for confirmation before executing the command.

Default Value:

Data Type: SwitchParameter

Attributes

 

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

true

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

 

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

WhatIf

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

Default Value:

Data Type: SwitchParameter

Attributes

 

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

true

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

 

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Input Type

 

Return Type

Microsoft.Windows.ServerManager.Migration.MigrationResult []

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)


Examples

-------------------------- EXAMPLE 1 --------------------------

Command Prompt: C:\PS>
Import-SmigServerSetting -Feature "DHCP" -User All -Group -Path "c:\temp\store" -Verbose

This sample command imports the Dynamic Host Configuration Protocol (DHCP) Server, and all other Windows features required by this technology. The command also import local user accounts, local groups, and group memberships to the location c:\temp\store that is specified in the -Path parameter.

Entering the password to decrypt the migration store is required. Because a password is not provided in this sample command, after you enter 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 --------------------------

Command Prompt: C:\PS>
Import-SmigServerSetting -IPConfig All -SourcePhysicalAddress "00-13-D3-F7-A1-3A","00-13-D3-F7-A1-4A" -TargetPhysicalAddress "11-13-D3-F7-A1-3A","11-13-D3-F7-A1-4A" -Path "c:\temp\store" -Password (Read-Host "Enter a Password:" -AsSecureString)-Verbose

This sample command imports the IP configuration from the migration store specified at c:\temp\store, and applies it to the local server. The IP configuration from the network interface card (NIC) with the physical address 00-13-D3-F7-A1-3A is migrated to the NIC with the physical address 11-13-D3-F7-A1-3A, and from the NIC with the physical address 00-13-D3-F7-A1-4A to the NIC with the physical address 11-13-D3-F7-A1-4A. This command also instructs the migration tools to import Windows IP configuration settings such as DNS Suffix Search List settings and Disable IPv6 registry key value.

The command also instructs the migration tools to display the string "Enter a Password:" to prompt users to enter the password to decrypt the migration store. 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 3 --------------------------

Command Prompt: C:\PS>
$c = Get-SmigServerFeature -Path "c:\temp\store"

Import-SmigServerSetting -Feature $c -Path "c:\temp\store" -Verbose

Description

-----------

This sample command imports a set of Windows features that have already been retrieved by using the Get-SmigServerFeature cmdlet.

The first line of the command retrieves role or feature objects specified by using the Get-SmigServerFeature cmdlet, and saves them in the $c variable. The second line of the command imports the Windows features represented by the $c variable from the migration store that is specified in the -Path parameter, c:\temp\store.

Entering the password to decrypt the migration store is required. Because a password is not provided in this sample command, after you enter 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 4 --------------------------

Command Prompt: C:\PS>
Get-SmigServerFeature -Path "c:\temp\store" | Import-SmigServerSetting -Path "c:\temp\store" -Verbose

This sample command pipes a set of features that have already been retrieved by using the Get-SmigServerFeature cmdlet to the Import-SmigServerSetting cmdlet.

The first part of the command, before the pipe (|) character, retrieves all role or feature objects listed by using the Get-SmigServerFeature cmdlet that are found in the store specified by the Path parameter. The second part of the command imports those Windows features that are both listed by Get-SmigServerFeature and available in the migration store.

Entering the password to decrypt the migration store is required. Because a password is not provided in this sample command, after you enter 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 5 --------------------------

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

C:\PS>Import-SmigServerSetting -User All -Password $pass -Path "c:\store" -Verbose

Description

-----------

In this example, the first command convert the store encryption password, represented by "password," to a secure string, and store it in the variable $pass. The second command imports all local user accounts, uses the value of the variable $pass as the password to decrypt the migration store.

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

See Also

Reference

Export-SmigServerSetting

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.