Skip to content

Commit e8b7424

Browse files
Fixed typos in Enter-PSSession -UserName parameter description (#12878)
* Update Enter-PSSession.md Fixed spelling "uou" -> "you" and hyphenated "key based" -> "key-based" * Update description of SSH auth behavior and sync versions * Same changes for New-PSSession --------- Co-authored-by: Sean Wheeler <sean.wheeler@microsoft.com>
1 parent 9ecf9bf commit e8b7424

File tree

6 files changed

+48
-81
lines changed

6 files changed

+48
-81
lines changed

reference/7.4/Microsoft.PowerShell.Core/Enter-PSSession.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: System.Management.Automation.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Core
5-
ms.date: 06/14/2024
5+
ms.date: 03/23/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/enter-pssession?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -827,17 +827,13 @@ Accept wildcard characters: False
827827

828828
### -UserName
829829

830-
Specifies the user name for the account used to create a session on the remote computer. User
830+
Specifies the user name for the account used to create a session on the remote computer. If the
831+
**UserName** parameter isn't specified then the current logged on username is used. User
831832
authentication method depends on how Secure Shell (SSH) is configured on the remote computer.
832833

833-
If SSH is configured for basic password authentication then you are prompted for the user password.
834-
835-
If SSH is configured for key based user authentication then uou aren't prompted for a password. You
836-
must provide a path to an SSH key file. If the user key file is located in an SSH known location
837-
then the **KeyFilePath** parameter isn't needed. User authentication occurs automatically based on
838-
the user name. See SSH documentation about key based user authentication for more information.
839-
840-
If the **UserName** parameter isn't specified then the current logged on username is used.
834+
- If SSH is configured for password authentication then you are prompted for the user password.
835+
- If SSH is configured for key-based user authentication then you must have an SSH key file. If the
836+
user key file is located in an SSH-known location then the **KeyFilePath** parameter isn't needed.
841837

842838
This parameter was introduced in PowerShell 6.0.
843839

reference/7.4/Microsoft.PowerShell.Core/New-PSSession.md

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: System.Management.Automation.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Core
5-
ms.date: 12/09/2022
5+
ms.date: 03/23/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/new-pssession?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -91,7 +91,7 @@ remote computer.
9191
Use a **PSSession** to run multiple commands that share data, such as a function or the value of a
9292
variable. To run commands in a **PSSession**, use the `Invoke-Command` cmdlet. To use the
9393
**PSSession** to interact directly with a remote computer, use the `Enter-PSSession` cmdlet. For
94-
more information, see [about_PSSessions](about/about_PSSessions.md).
94+
more information, see [about_PSSessions](About/about_PSSessions.md).
9595

9696
You can run commands on a remote computer without creating a **PSSession** with the **ComputerName**
9797
parameters of `Enter-PSSession` or `Invoke-Command`. When you use the **ComputerName** parameter,
@@ -140,7 +140,7 @@ help you manage the **PSSession** objects in subsequent commands.
140140
### Example 3: Create sessions on multiple computers
141141

142142
```powershell
143-
$s1, $s2, $s3 = New-PSSession -ComputerName Server01,Server02,Server03
143+
$s1, $s2, $s3 = New-PSSession -ComputerName Server01, Server02, Server03
144144
```
145145

146146
This command creates three **PSSession** objects, one on each of the computers specified by the
@@ -463,7 +463,7 @@ To use an IP address in the value of the **ComputerName** parameter, the command
463463
address of the remote computer must be included in the WinRM TrustedHosts list on the local
464464
computer. For instructions for adding a computer name to the TrustedHosts list, see "How to Add a
465465
Computer to the Trusted Host List" in
466-
[about_Remote_Troubleshooting](about/about_Remote_Troubleshooting.md).
466+
[about_Remote_Troubleshooting](About/about_Remote_Troubleshooting.md).
467467

468468
To include the local computer in the value of the **ComputerName** parameter, start Windows
469469
PowerShell by using the **Run as administrator option**.
@@ -742,7 +742,7 @@ Before using another port, you must configure the WinRM listener on the remote c
742742
that port. Use the following commands to configure the listener:
743743

744744
1. `winrm delete winrm/config/listener?Address=*+Transport=HTTP`
745-
2. `winrm create winrm/config/listener?Address=*+Transport=HTTP @{Port="\<port-number\>"}`
745+
1. `winrm create winrm/config/listener?Address=*+Transport=HTTP @{Port="\<port-number\>"}`
746746

747747
Do not use the **Port** parameter unless you must. The port setting in the command applies to all
748748
computers or sessions on which the command runs. An alternate port setting might prevent the command
@@ -922,20 +922,13 @@ Accept wildcard characters: False
922922

923923
### -UserName
924924

925-
Specifies the username for the account used to create a session on the remote computer. The user
925+
Specifies the user name for the account used to create a session on the remote computer. If the
926+
**UserName** parameter isn't specified then the current logged on username is used. User
926927
authentication method depends on how Secure Shell (SSH) is configured on the remote computer.
927928

928-
If SSH is configured for basic password authentication then you'll be prompted for the user
929-
password.
930-
931-
If SSH is configured for key-based user authentication then a key file path can be provided via the
932-
**KeyFilePath** parameter and you won't be prompted for a password. Note that if the client user key
933-
file is located in an SSH known location then the **KeyFilePath** parameter is not needed for
934-
key-based authentication, and user authentication occurs automatically based on the username. See
935-
SSH documentation about key-based user authentication for more information.
936-
937-
This is not a required parameter. If no **UserName** parameter is specified then the current log on
938-
username is used for the connection.
929+
- If SSH is configured for password authentication then you are prompted for the user password.
930+
- If SSH is configured for key-based user authentication then you must have an SSH key file. If the
931+
user key file is located in an SSH-known location then the **KeyFilePath** parameter isn't needed.
939932

940933
This parameter was introduced in PowerShell 6.0.
941934

@@ -1035,8 +1028,8 @@ Accept wildcard characters: False
10351028

10361029
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
10371030
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
1038-
-WarningAction, and -WarningVariable. For more information, see about_CommonParameters
1039-
(https://go.microsoft.com/fwlink/?LinkID=113216).
1031+
-WarningAction, and -WarningVariable. For more information, see
1032+
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
10401033

10411034
## INPUTS
10421035

reference/7.5/Microsoft.PowerShell.Core/Enter-PSSession.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: System.Management.Automation.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Core
5-
ms.date: 06/14/2024
5+
ms.date: 03/23/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/enter-pssession?view=powershell-7.5&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -827,17 +827,13 @@ Accept wildcard characters: False
827827

828828
### -UserName
829829

830-
Specifies the user name for the account used to create a session on the remote computer. User
830+
Specifies the user name for the account used to create a session on the remote computer. If the
831+
**UserName** parameter isn't specified then the current logged on username is used. User
831832
authentication method depends on how Secure Shell (SSH) is configured on the remote computer.
832833

833-
If SSH is configured for basic password authentication then you are prompted for the user password.
834-
835-
If SSH is configured for key based user authentication then uou aren't prompted for a password. You
836-
must provide a path to an SSH key file. If the user key file is located in an SSH known location
837-
then the **KeyFilePath** parameter isn't needed. User authentication occurs automatically based on
838-
the user name. See SSH documentation about key based user authentication for more information.
839-
840-
If the **UserName** parameter isn't specified then the current logged on username is used.
834+
- If SSH is configured for password authentication then you are prompted for the user password.
835+
- If SSH is configured for key-based user authentication then you must have an SSH key file. If the
836+
user key file is located in an SSH-known location then the **KeyFilePath** parameter isn't needed.
841837

842838
This parameter was introduced in PowerShell 6.0.
843839

reference/7.5/Microsoft.PowerShell.Core/New-PSSession.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: System.Management.Automation.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Core
5-
ms.date: 12/09/2022
5+
ms.date: 03/23/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/new-pssession?view=powershell-7.5&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -922,20 +922,13 @@ Accept wildcard characters: False
922922

923923
### -UserName
924924

925-
Specifies the username for the account used to create a session on the remote computer. The user
925+
Specifies the user name for the account used to create a session on the remote computer. If the
926+
**UserName** parameter isn't specified then the current logged on username is used. User
926927
authentication method depends on how Secure Shell (SSH) is configured on the remote computer.
927928

928-
If SSH is configured for basic password authentication then you'll be prompted for the user
929-
password.
930-
931-
If SSH is configured for key-based user authentication then a key file path can be provided via the
932-
**KeyFilePath** parameter and you won't be prompted for a password. Note that if the client user key
933-
file is located in an SSH known location then the **KeyFilePath** parameter is not needed for
934-
key-based authentication, and user authentication occurs automatically based on the username. See
935-
SSH documentation about key-based user authentication for more information.
936-
937-
This is not a required parameter. If no **UserName** parameter is specified then the current log on
938-
username is used for the connection.
929+
- If SSH is configured for password authentication then you are prompted for the user password.
930+
- If SSH is configured for key-based user authentication then you must have an SSH key file. If the
931+
user key file is located in an SSH-known location then the **KeyFilePath** parameter isn't needed.
939932

940933
This parameter was introduced in PowerShell 6.0.
941934

reference/7.6/Microsoft.PowerShell.Core/Enter-PSSession.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: System.Management.Automation.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Core
5-
ms.date: 06/14/2024
5+
ms.date: 03/23/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/enter-pssession?view=powershell-7.6&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -827,17 +827,13 @@ Accept wildcard characters: False
827827

828828
### -UserName
829829

830-
Specifies the user name for the account used to create a session on the remote computer. User
830+
Specifies the user name for the account used to create a session on the remote computer. If the
831+
**UserName** parameter isn't specified then the current logged on username is used. User
831832
authentication method depends on how Secure Shell (SSH) is configured on the remote computer.
832833

833-
If SSH is configured for basic password authentication then you are prompted for the user password.
834-
835-
If SSH is configured for key based user authentication then uou aren't prompted for a password. You
836-
must provide a path to an SSH key file. If the user key file is located in an SSH known location
837-
then the **KeyFilePath** parameter isn't needed. User authentication occurs automatically based on
838-
the user name. See SSH documentation about key based user authentication for more information.
839-
840-
If the **UserName** parameter isn't specified then the current logged on username is used.
834+
- If SSH is configured for password authentication then you are prompted for the user password.
835+
- If SSH is configured for key-based user authentication then you must have an SSH key file. If the
836+
user key file is located in an SSH-known location then the **KeyFilePath** parameter isn't needed.
841837

842838
This parameter was introduced in PowerShell 6.0.
843839

reference/7.6/Microsoft.PowerShell.Core/New-PSSession.md

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: System.Management.Automation.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Core
5-
ms.date: 12/09/2022
5+
ms.date: 03/23/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/new-pssession?view=powershell-7.6&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -91,7 +91,7 @@ remote computer.
9191
Use a **PSSession** to run multiple commands that share data, such as a function or the value of a
9292
variable. To run commands in a **PSSession**, use the `Invoke-Command` cmdlet. To use the
9393
**PSSession** to interact directly with a remote computer, use the `Enter-PSSession` cmdlet. For
94-
more information, see [about_PSSessions](about/about_PSSessions.md).
94+
more information, see [about_PSSessions](About/about_PSSessions.md).
9595

9696
You can run commands on a remote computer without creating a **PSSession** with the **ComputerName**
9797
parameters of `Enter-PSSession` or `Invoke-Command`. When you use the **ComputerName** parameter,
@@ -140,7 +140,7 @@ help you manage the **PSSession** objects in subsequent commands.
140140
### Example 3: Create sessions on multiple computers
141141

142142
```powershell
143-
$s1, $s2, $s3 = New-PSSession -ComputerName Server01,Server02,Server03
143+
$s1, $s2, $s3 = New-PSSession -ComputerName Server01, Server02, Server03
144144
```
145145

146146
This command creates three **PSSession** objects, one on each of the computers specified by the
@@ -463,7 +463,7 @@ To use an IP address in the value of the **ComputerName** parameter, the command
463463
address of the remote computer must be included in the WinRM TrustedHosts list on the local
464464
computer. For instructions for adding a computer name to the TrustedHosts list, see "How to Add a
465465
Computer to the Trusted Host List" in
466-
[about_Remote_Troubleshooting](about/about_Remote_Troubleshooting.md).
466+
[about_Remote_Troubleshooting](About/about_Remote_Troubleshooting.md).
467467

468468
To include the local computer in the value of the **ComputerName** parameter, start Windows
469469
PowerShell by using the **Run as administrator option**.
@@ -742,7 +742,7 @@ Before using another port, you must configure the WinRM listener on the remote c
742742
that port. Use the following commands to configure the listener:
743743

744744
1. `winrm delete winrm/config/listener?Address=*+Transport=HTTP`
745-
2. `winrm create winrm/config/listener?Address=*+Transport=HTTP @{Port="\<port-number\>"}`
745+
1. `winrm create winrm/config/listener?Address=*+Transport=HTTP @{Port="\<port-number\>"}`
746746

747747
Do not use the **Port** parameter unless you must. The port setting in the command applies to all
748748
computers or sessions on which the command runs. An alternate port setting might prevent the command
@@ -922,20 +922,13 @@ Accept wildcard characters: False
922922

923923
### -UserName
924924

925-
Specifies the username for the account used to create a session on the remote computer. The user
925+
Specifies the user name for the account used to create a session on the remote computer. If the
926+
**UserName** parameter isn't specified then the current logged on username is used. User
926927
authentication method depends on how Secure Shell (SSH) is configured on the remote computer.
927928

928-
If SSH is configured for basic password authentication then you'll be prompted for the user
929-
password.
930-
931-
If SSH is configured for key-based user authentication then a key file path can be provided via the
932-
**KeyFilePath** parameter and you won't be prompted for a password. Note that if the client user key
933-
file is located in an SSH known location then the **KeyFilePath** parameter is not needed for
934-
key-based authentication, and user authentication occurs automatically based on the username. See
935-
SSH documentation about key-based user authentication for more information.
936-
937-
This is not a required parameter. If no **UserName** parameter is specified then the current log on
938-
username is used for the connection.
929+
- If SSH is configured for password authentication then you are prompted for the user password.
930+
- If SSH is configured for key-based user authentication then you must have an SSH key file. If the
931+
user key file is located in an SSH-known location then the **KeyFilePath** parameter isn't needed.
939932

940933
This parameter was introduced in PowerShell 6.0.
941934

@@ -1035,8 +1028,8 @@ Accept wildcard characters: False
10351028

10361029
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
10371030
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
1038-
-WarningAction, and -WarningVariable. For more information, see about_CommonParameters
1039-
(https://go.microsoft.com/fwlink/?LinkID=113216).
1031+
-WarningAction, and -WarningVariable. For more information, see
1032+
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
10401033

10411034
## INPUTS
10421035

0 commit comments

Comments
 (0)