Skip to content

Commit

Permalink
update docs for -CustomPipeName (#4032)
Browse files Browse the repository at this point in the history
* update docs for -CustomPipeName

* typo

* warning fixed

* update date and common parameters

* delete new line after Synopsis
  • Loading branch information
TylerLeonhardt authored and sdwheeler committed Mar 25, 2019
1 parent 8227a7c commit 2f72b78
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 7 deletions.
23 changes: 20 additions & 3 deletions reference/6/Microsoft.PowerShell.Core/About/about_pwsh.md
Original file line number Diff line number Diff line change
@@ -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
---
Expand All @@ -21,6 +20,7 @@ pwsh starts a PowerShell session.
pwsh[.exe]
[-Version]
[-ConfigurationName]
[-CustomPipeName <string>]
[-EncodedCommand <Base64EncodedCommand>]
[-ExecutionPolicy <ExecutionPolicy>]
[-InputFormat {Text | XML}]
Expand Down Expand Up @@ -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 <PipeName>

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 <Base64EncodedCommand>

Accepts a base-64-encoded string version of a command. Use this parameter to
Expand Down Expand Up @@ -184,4 +195,10 @@ pwsh -SettingsFile ~/powershell.config.json
# Example of specifying a configuration name
pwsh -ConfigurationName AdminRoles
```
# Example of specifying a custom pipe name
# PowerShell instance 1
pwsh -CustomPipeName mycustompipe
# PowerShell instance 2
Enter-PSHostProcess -CustomPipeName mycustompipe
```
35 changes: 31 additions & 4 deletions reference/6/Microsoft.PowerShell.Core/Enter-PSHostProcess.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -39,6 +39,12 @@ Enter-PSHostProcess [-Name] <String> [[-AppDomainName] <String>] [<CommonParamet
Enter-PSHostProcess [-HostProcessInfo] <PSHostProcessInfo> [[-AppDomainName] <String>] [<CommonParameters>]
```

### PipeNameParameterSet

```
Enter-PSHostProcess -CustomPipeName <String> [<CommonParameters>]
```

## DESCRIPTION

The **Enter-PSHostProcess** cmdlet connects to and enters into an interactive session with a local process.
Expand Down Expand Up @@ -112,7 +118,7 @@ PS C:\>

```yaml
Type: String
Parameter Sets: (All)
Parameter Sets: ProcessIdParameterSet, ProcessParameterSet, ProcessNameParameterSet, PSHostProcessInfoParameterSet
Aliases:

Required: False
Expand Down Expand Up @@ -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

Expand All @@ -209,4 +236,4 @@ That is, they have loaded the PowerShell engine.

## RELATED LINKS

[Exit-PSHostProcess](Exit-PSHostProcess.md)
[Exit-PSHostProcess](Exit-PSHostProcess.md)

0 comments on commit 2f72b78

Please sign in to comment.