Skip to content

Commit 4d14878

Browse files
SteveL-MSFTjoeyaiello
authored and
joeyaiello
committed
Update docs to reflect new -Subsystem parameter (#2339)
* update docs to reflect new -Subsystem for PSSession cmdlets * address Paul's feedback
1 parent 4e33351 commit 4d14878

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
@@ -59,7 +59,7 @@ New-PSSession [-Name <String[]>] [-ConfigurationName <String>] -ContainerId <Str
5959
### SSHHost
6060
```
6161
New-PSSession [-HostName] <string[]> [-Name <string[]>] [-Port <int>] [-UserName <string>] [-KeyFilePath <string>
62-
[-ConfigurationName <String>] [-SSHTransport] [<CommonParameters>]
62+
[-Subsystem <String>] [-SSHTransport] [<CommonParameters>]
6363
```
6464

6565
### SSHHostHashParam
@@ -384,7 +384,7 @@ For more information, see [about_Preference_Variables](About/about_Preference_Va
384384

385385
```yaml
386386
Type: String
387-
Parameter Sets: ComputerName, VMName, Uri, VMId, ContainerId, HostName
387+
Parameter Sets: ComputerName, VMName, Uri, VMId, ContainerId
388388
Aliases:
389389
390390
Required: False
@@ -904,6 +904,27 @@ Accept pipeline input: False
904904
Accept wildcard characters: False
905905
```
906906

907+
### -Subsystem
908+
Specifies the SSH subsystem used for the new **PSSession**.
909+
910+
This specifies the subsystem to use on the target as defined in sshd_config.
911+
The subsystem starts a specific version of PowerShell with predefined parameters.
912+
If the specified subsystem does not exist on the remote computer, the command fails.
913+
914+
If this parameter is not used, the default is the 'powershell' subsystem.
915+
916+
```yaml
917+
Type: String
918+
Parameter Sets: HostName
919+
Aliases:
920+
921+
Required: False
922+
Position: Named
923+
Default value: powershell
924+
Accept pipeline input: True (ByPropertyName)
925+
Accept wildcard characters: False
926+
```
927+
907928
### CommonParameters
908929
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).
909930

0 commit comments

Comments
 (0)