11---
22external help file : Microsoft.Windows.ServerManager.Migration.dll-Help.xml
33Module Name : ServerMigration
4- ms.date : 12/06/2017
4+ ms.date : 04/29/2022
55online version : https://docs.microsoft.com/powershell/module/servermigration/import-smigserversetting?view=windowsserver2012r2-ps&wt.mc_id=ps-gethelp
66schema : 2.0.0
77title : Import-SmigServerSetting
@@ -35,7 +35,7 @@ For online Help about the Windows Server Migration Tools cmdlets, see http://go.
3535
3636### EXAMPLE 1
3737```
38- PS C:\> Import-SmigServerSetting -Feature " DHCP" -User All -Group -Path " c:\temp\store" -Verbose
38+ Import-SmigServerSetting -FeatureID ' DHCP' -User All -Group -Path ' c:\temp\store' -Verbose
3939```
4040
4141This sample command imports the Dynamic Host Configuration Protocol (DHCP) Server, and all other Windows features required by this technology.
@@ -50,7 +50,15 @@ By using the -Verbose parameter, the command also displays detailed information
5050
5151### EXAMPLE 2
5252```
53- PS C:\> 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
53+ $parameters = @{
54+ IPConfig = 'All'
55+ SourcePhysicalAddress = '00-13-D3-F7-A1-3A','00-13-D3-F7-A1-4A'
56+ TargetPhysicalAddress = '11-13-D3-F7-A1-3A','11-13-D3-F7-A1-4A'
57+ Path = 'c:\temp\store'
58+ Password = (Read-Host -Prompt 'Enter a Password:' -AsSecureString)
59+ Verbose = $true
60+ }
61+ Import-SmigServerSetting @parameters
5462```
5563
5664This sample command imports the IP configuration from the migration store specified at c:\temp\store, and applies it to the local server.
@@ -65,8 +73,8 @@ By using the -Verbose parameter, the command also displays detailed information
6573
6674### EXAMPLE 3
6775```
68- PS C:\> $c = Get-SmigServerFeature -Path " c:\temp\store"
69- PS C:\> Import-SmigServerSetting -Feature $c -Path " c:\temp\store" -Verbose
76+ $c = Get-SmigServerFeature -Path ' c:\temp\store'
77+ Import-SmigServerSetting -FeatureID $c -Path ' c:\temp\store' -Verbose
7078```
7179
7280This sample command imports a set of Windows features that have already been retrieved by using the Get-SmigServerFeature cmdlet.
@@ -83,7 +91,7 @@ By using the -Verbose parameter, the command also displays detailed information
8391
8492### EXAMPLE 4
8593```
86- PS C:\> Get-SmigServerFeature -Path " c:\temp\store" | Import-SmigServerSetting -Path " c:\temp\store" -Verbose
94+ Get-SmigServerFeature -Path ' c:\temp\store' | Import-SmigServerSetting -Path ' c:\temp\store' -Verbose
8795```
8896
8997This sample command pipes a set of features that have already been retrieved by using the Get-SmigServerFeature cmdlet to the Import-SmigServerSetting cmdlet.
@@ -100,8 +108,8 @@ By using the -Verbose parameter, the command also displays detailed information
100108
101109### EXAMPLE 5
102110```
103- PS C:\> $pass = ConvertTo-SecureString -String " password" -AsPlainText -Force
104- PS C:\> Import-SmigServerSetting -User All -Password $pass -Path " c:\store" -Verbose
111+ $pass = ConvertTo-SecureString -String ' password' -AsPlainText -Force
112+ Import-SmigServerSetting -User All -Password $pass -Path ' c:\store' -Verbose
105113```
106114
107115In this example, the first command convert the store encryption password, represented by "password," to a secure string, and store it in the variable $pass.
0 commit comments