From 01262eb0219101a4c9ff338930cd050e4a8b8a8d Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Thu, 19 Apr 2018 08:32:17 +0200 Subject: [PATCH 1/2] update docs to reflect new -Subsystem for PSSession cmdlets --- .../Enter-PSSession.md | 28 +++++++++++++++++-- .../Invoke-Command.md | 28 +++++++++++++++++-- .../New-PSSession.md | 28 +++++++++++++++++-- 3 files changed, 78 insertions(+), 6 deletions(-) diff --git a/reference/6/Microsoft.PowerShell.Core/Enter-PSSession.md b/reference/6/Microsoft.PowerShell.Core/Enter-PSSession.md index 5ad7c2cf3961..92d669d9ae17 100644 --- a/reference/6/Microsoft.PowerShell.Core/Enter-PSSession.md +++ b/reference/6/Microsoft.PowerShell.Core/Enter-PSSession.md @@ -69,7 +69,7 @@ Enter-PSSession -ContainerId [-ConfigurationName ] [-RunAsAdmin ### HostName ``` Enter-PSSession [-HostName] [-Port ] [-UserName ] [-KeyFilePath ] [-SSHTransport] - [-ConfigurationName ] [] + [-Subsystem ] [] ``` ## DESCRIPTION @@ -317,7 +317,7 @@ For more information, see about_Preference_Variables. ```yaml Type: String -Parameter Sets: ComputerName, Uri, VMId, VMName, ContainerId, HostName +Parameter Sets: ComputerName, Uri, VMId, VMName, ContainerId Aliases: Required: False @@ -629,6 +629,30 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Subsystem +Specifies the SSH subsystem used for the new **PSSession**. + +This specifies the subsystem to use on the target as defined in sshd_config. + +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. + +The default value is the value of the $PSSessionConfigurationName preference variable on the local computer. +If this preference variable is not set, the default is the 'powershell' subsystem. +For more information, see about_Preference_Variables. + +```yaml +Type: String +Parameter Sets: HostName +Aliases: + +Required: False +Position: Named +Default value: powershell +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + ### -UserName 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. diff --git a/reference/6/Microsoft.PowerShell.Core/Invoke-Command.md b/reference/6/Microsoft.PowerShell.Core/Invoke-Command.md index 649785919522..8b85deefdd43 100644 --- a/reference/6/Microsoft.PowerShell.Core/Invoke-Command.md +++ b/reference/6/Microsoft.PowerShell.Core/Invoke-Command.md @@ -116,7 +116,7 @@ Invoke-Command [-ConfigurationName ] [-ThrottleLimit ] [-AsJob] [ ### HostName ``` -Invoke-Command [-ConfigurationName ] -ScriptBlock -HostName [-Port ] +Invoke-Command [-Subsystem ] -ScriptBlock -HostName [-Port ] [-AsJob] [-HideComputerName] [-UserName ] [-KeyFilePath ] [-SSHTransport] [-RemoteDebug] [-InputObject ] [-ArgumentList ] [] ``` @@ -715,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, HostName +Parameter Sets: ComputerName, FilePathComputerName, Uri, FilePathUri, VMId, VMName, FilePathVMId, FilePathVMName, ContainerId, FilePathContainerId Aliases: Required: False @@ -1228,6 +1228,30 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Subsystem +Specifies the SSH subsystem used for the new **PSSession**. + +This specifies the subsystem to use on the target as defined in sshd_config. + +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. + +The default value is the value of the $PSSessionConfigurationName preference variable on the local computer. +If this preference variable is not set, the default is the 'powershell' subsystem. +For more information, see about_Preference_Variables. + +```yaml +Type: String +Parameter Sets: HostName +Aliases: + +Required: False +Position: Named +Default value: powershell +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + ### -UserName 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. diff --git a/reference/6/Microsoft.PowerShell.Core/New-PSSession.md b/reference/6/Microsoft.PowerShell.Core/New-PSSession.md index 9d51d06b1fd0..e2079a8b4a4b 100644 --- a/reference/6/Microsoft.PowerShell.Core/New-PSSession.md +++ b/reference/6/Microsoft.PowerShell.Core/New-PSSession.md @@ -58,7 +58,7 @@ New-PSSession [-Name ] [-ConfigurationName ] -ContainerId [-Name ] [-Port ] [-UserName ] [-KeyFilePath - [-ConfigurationName ] [-SSHTransport] [] + [-Subsystem ] [-SSHTransport] [] ``` ### SSHConnection @@ -380,7 +380,7 @@ For more information, see [about_Preference_Variables](About/about_Preference_Va ```yaml Type: String -Parameter Sets: ComputerName, VMName, Uri, VMId, ContainerId, HostName +Parameter Sets: ComputerName, VMName, Uri, VMId, ContainerId Aliases: Required: False @@ -800,6 +800,30 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Subsystem +Specifies the SSH subsystem used for the new **PSSession**. + +This specifies the subsystem to use on the target as defined in sshd_config. + +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. + +The default value is the value of the $PSSessionConfigurationName preference variable on the local computer. +If this preference variable is not set, the default is the 'powershell' subsystem. +For more information, see about_Preference_Variables. + +```yaml +Type: String +Parameter Sets: HostName +Aliases: + +Required: False +Position: Named +Default value: powershell +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + ### CommonParameters 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). From 7a73aa3f793092ac305c95a206c70f2db5f6c0ca Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Thu, 26 Apr 2018 20:54:02 -0700 Subject: [PATCH 2/2] address Paul's feedback --- reference/6/Microsoft.PowerShell.Core/Enter-PSSession.md | 9 +++------ reference/6/Microsoft.PowerShell.Core/Invoke-Command.md | 9 +++------ reference/6/Microsoft.PowerShell.Core/New-PSSession.md | 9 +++------ 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/reference/6/Microsoft.PowerShell.Core/Enter-PSSession.md b/reference/6/Microsoft.PowerShell.Core/Enter-PSSession.md index 92d669d9ae17..056ec5bd1904 100644 --- a/reference/6/Microsoft.PowerShell.Core/Enter-PSSession.md +++ b/reference/6/Microsoft.PowerShell.Core/Enter-PSSession.md @@ -633,13 +633,10 @@ Accept wildcard characters: False Specifies the SSH subsystem used for the new **PSSession**. This specifies the subsystem to use on the target as defined in sshd_config. +The subsystem starts a specific version of PowerShell with predefined parameters. +If the specified subsystem does not exist on the remote computer, the command fails. -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. - -The default value is the value of the $PSSessionConfigurationName preference variable on the local computer. -If this preference variable is not set, the default is the 'powershell' subsystem. -For more information, see about_Preference_Variables. +If this parameter is not used, the default is the 'powershell' subsystem. ```yaml Type: String diff --git a/reference/6/Microsoft.PowerShell.Core/Invoke-Command.md b/reference/6/Microsoft.PowerShell.Core/Invoke-Command.md index 8b85deefdd43..e50230507c7a 100644 --- a/reference/6/Microsoft.PowerShell.Core/Invoke-Command.md +++ b/reference/6/Microsoft.PowerShell.Core/Invoke-Command.md @@ -1232,13 +1232,10 @@ Accept wildcard characters: False Specifies the SSH subsystem used for the new **PSSession**. This specifies the subsystem to use on the target as defined in sshd_config. +The subsystem starts a specific version of PowerShell with predefined parameters. +If the specified subsystem does not exist on the remote computer, the command fails. -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. - -The default value is the value of the $PSSessionConfigurationName preference variable on the local computer. -If this preference variable is not set, the default is the 'powershell' subsystem. -For more information, see about_Preference_Variables. +If this parameter is not used, the default is the 'powershell' subsystem. ```yaml Type: String diff --git a/reference/6/Microsoft.PowerShell.Core/New-PSSession.md b/reference/6/Microsoft.PowerShell.Core/New-PSSession.md index e2079a8b4a4b..b249d6b0bdc9 100644 --- a/reference/6/Microsoft.PowerShell.Core/New-PSSession.md +++ b/reference/6/Microsoft.PowerShell.Core/New-PSSession.md @@ -804,13 +804,10 @@ Accept wildcard characters: False Specifies the SSH subsystem used for the new **PSSession**. This specifies the subsystem to use on the target as defined in sshd_config. +The subsystem starts a specific version of PowerShell with predefined parameters. +If the specified subsystem does not exist on the remote computer, the command fails. -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. - -The default value is the value of the $PSSessionConfigurationName preference variable on the local computer. -If this preference variable is not set, the default is the 'powershell' subsystem. -For more information, see about_Preference_Variables. +If this parameter is not used, the default is the 'powershell' subsystem. ```yaml Type: String