Skip to content

Commit 71c7e21

Browse files
Correct examples to use -featureID
In my use of this command, passing the -Feature parameters results in an error. Using -featureID work as expected. ------- cc: @JasonGerend
1 parent 6be2896 commit 71c7e21

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

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

Lines changed: 8 additions & 8 deletions
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,7 @@ 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+
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 -Prompt "Enter a Password:" -AsSecureString)-Verbose
5454
```
5555

5656
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 +65,8 @@ By using the -Verbose parameter, the command also displays detailed information
6565

6666
### EXAMPLE 3
6767
```
68-
PS C:\> $c = Get-SmigServerFeature -Path "c:\temp\store"
69-
PS C:\> Import-SmigServerSetting -Feature $c -Path "c:\temp\store" -Verbose
68+
$c = Get-SmigServerFeature -Path "c:\temp\store"
69+
Import-SmigServerSetting -featureID $c -Path "c:\temp\store" -Verbose
7070
```
7171

7272
This sample command imports a set of Windows features that have already been retrieved by using the Get-SmigServerFeature cmdlet.
@@ -83,7 +83,7 @@ By using the -Verbose parameter, the command also displays detailed information
8383

8484
### EXAMPLE 4
8585
```
86-
PS C:\> Get-SmigServerFeature -Path "c:\temp\store" | Import-SmigServerSetting -Path "c:\temp\store" -Verbose
86+
Get-SmigServerFeature -Path "c:\temp\store" | Import-SmigServerSetting -Path "c:\temp\store" -Verbose
8787
```
8888

8989
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 +100,8 @@ By using the -Verbose parameter, the command also displays detailed information
100100

101101
### EXAMPLE 5
102102
```
103-
PS C:\> $pass = ConvertTo-SecureString -String "password" -AsPlainText -Force
104-
PS C:\> Import-SmigServerSetting -User All -Password $pass -Path "c:\store" -Verbose
103+
$pass = ConvertTo-SecureString -String "password" -AsPlainText -Force
104+
Import-SmigServerSetting -User All -Password $pass -Path "c:\store" -Verbose
105105
```
106106

107107
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)