From 2f72b78b7907262efff90b95fabd5900568dc473 Mon Sep 17 00:00:00 2001 From: Tyler James Leonhardt Date: Mon, 25 Mar 2019 10:04:29 -0700 Subject: [PATCH] update docs for -CustomPipeName (#4032) * update docs for -CustomPipeName * typo * warning fixed * update date and common parameters * delete new line after Synopsis --- .../About/about_pwsh.md | 23 ++++++++++-- .../Enter-PSHostProcess.md | 35 ++++++++++++++++--- 2 files changed, 51 insertions(+), 7 deletions(-) diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_pwsh.md b/reference/6/Microsoft.PowerShell.Core/About/about_pwsh.md index 40cf77c02e9e..c95e7dfc715f 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_pwsh.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_pwsh.md @@ -1,7 +1,6 @@ --- -ms.date: 06/09/2017 +ms.date: 03/22/2019 schema: 2.0.0 -locale: en-us keywords: powershell,cmdlet title: about_PowerShell_exe --- @@ -21,6 +20,7 @@ pwsh starts a PowerShell session. pwsh[.exe] [-Version] [-ConfigurationName] +[-CustomPipeName ] [-EncodedCommand ] [-ExecutionPolicy ] [-InputFormat {Text | XML}] @@ -50,6 +50,17 @@ Specifies a configuration endpoint in which PowerShell is run. This can be any endpoint registered on the local machine including the default PowerShell remoting endpoints or a custom endpoint having specific user role capabilities. +#### -CustomPipeName + +Specifies the name to use for an additional IPC server +(named pipe) +used for debugging and other cross-process communication. +This offers a predictable mechanism for connecting to other PowerShell instances. +Typically used with the +`CustomPipeName` +parameter on +`Enter-PSHostProcess`. + #### -EncodedCommand Accepts a base-64-encoded string version of a command. Use this parameter to @@ -184,4 +195,10 @@ pwsh -SettingsFile ~/powershell.config.json # Example of specifying a configuration name pwsh -ConfigurationName AdminRoles -``` \ No newline at end of file + +# Example of specifying a custom pipe name +# PowerShell instance 1 +pwsh -CustomPipeName mycustompipe +# PowerShell instance 2 +Enter-PSHostProcess -CustomPipeName mycustompipe +``` diff --git a/reference/6/Microsoft.PowerShell.Core/Enter-PSHostProcess.md b/reference/6/Microsoft.PowerShell.Core/Enter-PSHostProcess.md index bf8764059297..2b77f1f85f0a 100644 --- a/reference/6/Microsoft.PowerShell.Core/Enter-PSHostProcess.md +++ b/reference/6/Microsoft.PowerShell.Core/Enter-PSHostProcess.md @@ -3,7 +3,7 @@ external help file: System.Management.Automation.dll-Help.xml keywords: powershell,cmdlet locale: en-us Module Name: Microsoft.PowerShell.Core -ms.date: 06/09/2017 +ms.date: 03/22/2019 online version: http://go.microsoft.com/fwlink/?LinkID=403736 schema: 2.0.0 title: Enter-PSHostProcess @@ -39,6 +39,12 @@ Enter-PSHostProcess [-Name] [[-AppDomainName] ] [ [[-AppDomainName] ] [] ``` +### PipeNameParameterSet + +``` +Enter-PSHostProcess -CustomPipeName [] +``` + ## DESCRIPTION The **Enter-PSHostProcess** cmdlet connects to and enters into an interactive session with a local process. @@ -112,7 +118,7 @@ PS C:\> ```yaml Type: String -Parameter Sets: (All) +Parameter Sets: ProcessIdParameterSet, ProcessParameterSet, ProcessNameParameterSet, PSHostProcessInfoParameterSet Aliases: Required: False @@ -188,9 +194,30 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -CustomPipeName + +Gets or sets the custom named pipe name to connect to. +This is usually used in conjunction with +`pwsh -CustomPipeName`. + +```yaml +Type: String +Parameter Sets: PipeNameParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +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). +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). ## INPUTS @@ -209,4 +236,4 @@ That is, they have loaded the PowerShell engine. ## RELATED LINKS -[Exit-PSHostProcess](Exit-PSHostProcess.md) \ No newline at end of file +[Exit-PSHostProcess](Exit-PSHostProcess.md)