Skip to content

update documentation to reflect that -ConfigurationName can be used with SSH #2318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions reference/6/Microsoft.PowerShell.Core/Enter-PSSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ Enter-PSSession -ContainerId <String> [-ConfigurationName <String>] [-RunAsAdmin

### HostName
```
Enter-PSSession [-HostName] <string> [-Port <int>] [-UserName <string>] [-KeyFilePath <string>] [-SSHTransport] [<CommonParameters>]
Enter-PSSession [-HostName] <string> [-Port <int>] [-UserName <string>] [-KeyFilePath <string>] [-SSHTransport]
[-ConfigurationName <String>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -304,6 +305,9 @@ Specifies the session configuration that is used for the interactive session.
Enter a configuration name or the fully qualified resource URI for a session configuration.
If you specify only the configuration name, the following schema URI is prepended: http://schemas.microsoft.com/powershell.

When used with SSH, this specifies the subsystem to use on the target as defined in sshd_config.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel that ConfigurationName parameter should not be used to specify an SSH session subsystem. We should reserve this for when we add session configuration support to SSH.

The default value for SSH is the `powershell` subsystem.

The session configuration for a session is located on the remote computer.
If the specified session configuration does not exist on the remote computer, the command fails.

Expand All @@ -313,7 +317,7 @@ For more information, see about_Preference_Variables.

```yaml
Type: String
Parameter Sets: ComputerName, Uri, VMId, VMName, ContainerId
Parameter Sets: ComputerName, Uri, VMId, VMName, ContainerId, HostName
Aliases:

Required: False
Expand Down
13 changes: 8 additions & 5 deletions reference/6/Microsoft.PowerShell.Core/Invoke-Command.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ Invoke-Command [-ConfigurationName <String>] [-ThrottleLimit <Int32>] [-AsJob] [

### HostName
```
Invoke-Command -ScriptBlock <scriptblock> -HostName <string[]> [-Port <int>] [-AsJob]
[-HideComputerName] [-UserName <string>] [-KeyFilePath <string>] [-SSHTransport] [-RemoteDebug]
[-InputObject <psobject>] [-ArgumentList <Object[]>] [<CommonParameters>]
Invoke-Command [-ConfigurationName <String>] -ScriptBlock <scriptblock> -HostName <string[]> [-Port <int>]
[-AsJob] [-HideComputerName] [-UserName <string>] [-KeyFilePath <string>] [-SSHTransport] [-RemoteDebug]
[-InputObject <psobject>] [-ArgumentList <Object[]>] [<CommonParameters>]
```

### FilePathHostName
Expand Down Expand Up @@ -703,6 +703,9 @@ Specifies the session configuration that is used for the new **PSSession**.
Enter a configuration name or the fully qualified resource URI for a session configuration.
If you specify only the configuration name, the following schema URI is prepended: http://schemas.microsoft.com/PowerShell.

When used with SSH, this specifies the subsystem to use on the target as defined in sshd_config.
The default value for SSH is the `powershell` subsystem.

The session configuration for a session is located on the remote computer.
If the specified session configuration does not exist on the remote computer, the command fails.

Expand All @@ -712,7 +715,7 @@ For more information, see about_Preference_Variables.

```yaml
Type: String
Parameter Sets: ComputerName, FilePathComputerName, Uri, FilePathUri, VMId, VMName, FilePathVMId, FilePathVMName, ContainerId, FilePathContainerId
Parameter Sets: ComputerName, FilePathComputerName, Uri, FilePathUri, VMId, VMName, FilePathVMId, FilePathVMName, ContainerId, FilePathContainerId, HostName
Aliases:

Required: False
Expand Down Expand Up @@ -1245,7 +1248,7 @@ Accept wildcard characters: False
```

### -SSHConnection
This parameter takes an array of hashtables where each hashtable contains one or more connection parameters needed to establish a Secure Shell (SSH) connection (HostName, Port, UserName, KeyFilePath).
This parameter takes an array of hashtables where each hashtable contains one or more connection parameters needed to establish a Secure Shell (SSH) connection (HostName, Port, UserName, KeyFilePath, Subsystem).

The hashtable connection parameters are the same as defined for the HostName parameter set.

Expand Down
10 changes: 7 additions & 3 deletions reference/6/Microsoft.PowerShell.Core/New-PSSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ New-PSSession [-Name <String[]>] [-ConfigurationName <String>] -ContainerId <Str

### HostName
```
New-PSSession [-HostName] <string[]> [-Name <string[]>] [-Port <int>] [-UserName <string>] [-KeyFilePath <string>] [-SSHTransport] [<CommonParameters>]
New-PSSession [-HostName] <string[]> [-Name <string[]>] [-Port <int>] [-UserName <string>] [-KeyFilePath <string>
[-ConfigurationName <String>] [-SSHTransport] [<CommonParameters>]
```

### SSHConnection
Expand Down Expand Up @@ -367,6 +368,9 @@ Specifies the session configuration that is used for the new **PSSession**.
Enter a configuration name or the fully qualified resource URI for a session configuration.
If you specify only the configuration name, the following schema URI is prepended: http://schemas.microsoft.com/PowerShell.

When used with SSH, this specifies the subsystem to use on the target as defined in sshd_config.
The default value for SSH is the `powershell` subsystem.

The session configuration for a session is located on the remote computer.
If the specified session configuration does not exist on the remote computer, the command fails.

Expand All @@ -376,7 +380,7 @@ For more information, see [about_Preference_Variables](About/about_Preference_Va

```yaml
Type: String
Parameter Sets: ComputerName, VMName, Uri, VMId, ContainerId
Parameter Sets: ComputerName, VMName, Uri, VMId, ContainerId, HostName
Aliases:

Required: False
Expand Down Expand Up @@ -770,7 +774,7 @@ Accept wildcard characters: False
```

### -SSHConnection
This parameter takes an array of hashtables where each hashtable contains one or more connection parameters needed to establish a Secure Shell (SSH) connection (HostName, Port, UserName, KeyFilePath).
This parameter takes an array of hashtables where each hashtable contains one or more connection parameters needed to establish a Secure Shell (SSH) connection (HostName, Port, UserName, KeyFilePath, Subsystem).

The hashtable connection parameters are the same as defined for the **HostName** parameter set.

Expand Down