Skip to content

Commit 90fda80

Browse files
authored
Merge pull request MicrosoftDocs#2952 from timwarner-msft/patch-1
Correct examples to use -featureID
2 parents 6be2896 + 64d0983 commit 90fda80

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

docset/winserver2012r2-ps/servermigration/Import-SmigServerSetting.md

+16-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: Microsoft.Windows.ServerManager.Migration.dll-Help.xml
33
Module Name: ServerMigration
4-
ms.date: 12/06/2017
4+
ms.date: 04/29/2022
55
online version: https://docs.microsoft.com/powershell/module/servermigration/import-smigserversetting?view=windowsserver2012r2-ps&wt.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: 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

4141
This 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

5664
This 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

7280
This 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

8997
This 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

107115
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.

0 commit comments

Comments
 (0)