Skip to content

Commit 070f210

Browse files
SteveL-MSFTSean Wheeler
authored and
Sean Wheeler
committed
Update docs to reflect new -Subsystem parameter (#2339)
* update docs to reflect new -Subsystem for PSSession cmdlets * address Paul's feedback
1 parent 4f2e61c commit 070f210

File tree

3 files changed

+69
-6
lines changed

3 files changed

+69
-6
lines changed

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

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Enter-PSSession -ContainerId <String> [-ConfigurationName <String>] [-RunAsAdmin
6969
### HostName
7070
```
7171
Enter-PSSession [-HostName] <string> [-Port <int>] [-UserName <string>] [-KeyFilePath <string>] [-SSHTransport]
72-
[-ConfigurationName <String>] [<CommonParameters>]
72+
[-Subsystem <String>] [<CommonParameters>]
7373
```
7474

7575
## DESCRIPTION
@@ -317,7 +317,7 @@ For more information, see about_Preference_Variables.
317317

318318
```yaml
319319
Type: String
320-
Parameter Sets: ComputerName, Uri, VMId, VMName, ContainerId, HostName
320+
Parameter Sets: ComputerName, Uri, VMId, VMName, ContainerId
321321
Aliases:
322322
323323
Required: False
@@ -629,6 +629,27 @@ Accept pipeline input: False
629629
Accept wildcard characters: False
630630
```
631631

632+
### -Subsystem
633+
Specifies the SSH subsystem used for the new **PSSession**.
634+
635+
This specifies the subsystem to use on the target as defined in sshd_config.
636+
The subsystem starts a specific version of PowerShell with predefined parameters.
637+
If the specified subsystem does not exist on the remote computer, the command fails.
638+
639+
If this parameter is not used, the default is the 'powershell' subsystem.
640+
641+
```yaml
642+
Type: String
643+
Parameter Sets: HostName
644+
Aliases:
645+
646+
Required: False
647+
Position: Named
648+
Default value: powershell
649+
Accept pipeline input: True (ByPropertyName)
650+
Accept wildcard characters: False
651+
```
652+
632653
### -UserName
633654
Specifies the user name for the account used to create a session on the remote computer. User authentication method will depend on how Secure Shell (SSH) is configured on the remote computer.
634655

reference/6/Microsoft.PowerShell.Core/Invoke-Command.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Invoke-Command [-ConfigurationName <String>] [-ThrottleLimit <Int32>] [-AsJob] [
116116

117117
### HostName
118118
```
119-
Invoke-Command [-ConfigurationName <String>] -ScriptBlock <scriptblock> -HostName <string[]> [-Port <int>]
119+
Invoke-Command [-Subsystem <String>] -ScriptBlock <scriptblock> -HostName <string[]> [-Port <int>]
120120
[-AsJob] [-HideComputerName] [-UserName <string>] [-KeyFilePath <string>] [-SSHTransport] [-RemoteDebug]
121121
[-InputObject <psobject>] [-ArgumentList <Object[]>] [<CommonParameters>]
122122
```
@@ -715,7 +715,7 @@ For more information, see about_Preference_Variables.
715715

716716
```yaml
717717
Type: String
718-
Parameter Sets: ComputerName, FilePathComputerName, Uri, FilePathUri, VMId, VMName, FilePathVMId, FilePathVMName, ContainerId, FilePathContainerId, HostName
718+
Parameter Sets: ComputerName, FilePathComputerName, Uri, FilePathUri, VMId, VMName, FilePathVMId, FilePathVMName, ContainerId, FilePathContainerId
719719
Aliases:
720720
721721
Required: False
@@ -1228,6 +1228,27 @@ Accept pipeline input: False
12281228
Accept wildcard characters: False
12291229
```
12301230

1231+
### -Subsystem
1232+
Specifies the SSH subsystem used for the new **PSSession**.
1233+
1234+
This specifies the subsystem to use on the target as defined in sshd_config.
1235+
The subsystem starts a specific version of PowerShell with predefined parameters.
1236+
If the specified subsystem does not exist on the remote computer, the command fails.
1237+
1238+
If this parameter is not used, the default is the 'powershell' subsystem.
1239+
1240+
```yaml
1241+
Type: String
1242+
Parameter Sets: HostName
1243+
Aliases:
1244+
1245+
Required: False
1246+
Position: Named
1247+
Default value: powershell
1248+
Accept pipeline input: True (ByPropertyName)
1249+
Accept wildcard characters: False
1250+
```
1251+
12311252
### -UserName
12321253
Specifies the user name for the account used to run a command on the remote computer. User authentication method will depend on how Secure Shell (SSH) is configured on the remote computer.
12331254

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

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ New-PSSession [-Name <String[]>] [-ConfigurationName <String>] -ContainerId <Str
5858
### HostName
5959
```
6060
New-PSSession [-HostName] <string[]> [-Name <string[]>] [-Port <int>] [-UserName <string>] [-KeyFilePath <string>
61-
[-ConfigurationName <String>] [-SSHTransport] [<CommonParameters>]
61+
[-Subsystem <String>] [-SSHTransport] [<CommonParameters>]
6262
```
6363

6464
### SSHConnection
@@ -380,7 +380,7 @@ For more information, see [about_Preference_Variables](About/about_Preference_Va
380380

381381
```yaml
382382
Type: String
383-
Parameter Sets: ComputerName, VMName, Uri, VMId, ContainerId, HostName
383+
Parameter Sets: ComputerName, VMName, Uri, VMId, ContainerId
384384
Aliases:
385385
386386
Required: False
@@ -800,6 +800,27 @@ Accept pipeline input: False
800800
Accept wildcard characters: False
801801
```
802802

803+
### -Subsystem
804+
Specifies the SSH subsystem used for the new **PSSession**.
805+
806+
This specifies the subsystem to use on the target as defined in sshd_config.
807+
The subsystem starts a specific version of PowerShell with predefined parameters.
808+
If the specified subsystem does not exist on the remote computer, the command fails.
809+
810+
If this parameter is not used, the default is the 'powershell' subsystem.
811+
812+
```yaml
813+
Type: String
814+
Parameter Sets: HostName
815+
Aliases:
816+
817+
Required: False
818+
Position: Named
819+
Default value: powershell
820+
Accept pipeline input: True (ByPropertyName)
821+
Accept wildcard characters: False
822+
```
823+
803824
### CommonParameters
804825
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
805826

0 commit comments

Comments
 (0)