Skip to content

Add PipeName parameter to Invoke-RestMethod and Invoke-WebRequest docs - #12345

Open
mdaneri wants to merge 3 commits into
MicrosoftDocs:mainfrom
mdaneri:main
Open

Add PipeName parameter to Invoke-RestMethod and Invoke-WebRequest docs#12345
mdaneri wants to merge 3 commits into
MicrosoftDocs:mainfrom
mdaneri:main

Conversation

@mdaneri

@mdaneri mdaneri commented Sep 9, 2025

Copy link
Copy Markdown

Document -PipeName parameter for Invoke-RestMethod / Invoke-WebRequest (PowerShell 7.6)

PR Summary

Documents the new -PipeName parameter for both Invoke-RestMethod and Invoke-WebRequest in PowerShell 7.6.
This parameter enables sending HTTP requests over a local Windows named pipe transport.
It supports scenarios where an HTTP-speaking service is exposed only via a named pipe rather than a TCP port.

Key points:

  • Added parameter help section for -PipeName in both cmdlet help files.
  • Added a new usage example to each cmdlet (Example 10 for Invoke-RestMethod, Example 12 for Invoke-WebRequest).
  • Clarifies that -PipeName is Windows-only, local-only, and mutually exclusive with -UnixSocket.
  • Notes version availability (introduced in PowerShell 7.6).
  • Mirrors style and structure used for existing -UnixSocket parameter documentation.

Related feature implementation PR:

(No functional engine changes are included in this PR—documentation only.)

Additional Details / Rationale

Some self-hosted or system components expose lightweight HTTP endpoints over named pipes instead of binding to a TCP socket (for isolation or reduced surface).
Documenting -PipeName improves discoverability and provides parity with the previously documented -UnixSocket parameter.

Changes Included

  • Update: Invoke-RestMethod.md – new -PipeName parameter section + example.
  • Update: Invoke-WebRequest.md – new -PipeName parameter section + example.
  • Consistent wording: local-only, mutually exclusive with -UnixSocket, version note.

Usage Snippets

# Invoke-RestMethod over a local named pipe
Invoke-RestMethod -Uri 'http://localhost/status' -PipeName 'MyLocalHttpPipe'

# Invoke-WebRequest over a local named pipe
Invoke-WebRequest -Uri 'http://localhost/api/info' -PipeName 'ServiceControlPipe'

Compatibility / Limitations

  • Supported only on Windows (named pipes are a Windows-specific transport in this context).
  • Local machine only; does not support remote pipe endpoints.
  • Mutually exclusive with -UnixSocket.

Related Work / Follow Ups (Optional)

  • (Optional) Add CHANGELOG entry for 7.6 if not already covered by feature PR.
  • (Optional) Add cross-links in conceptual docs for advanced transports.

PR Checklist

  • Descriptive Title: Title summarizes the documentation change.
  • Summary: This PR's summary describes scope and intent.
  • Contributor's Guide: I have read the contributor's guide.
  • Style: Adheres to the style guide.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hold-for-pr Waiting - for PR merge hold-for-release Waiting - for next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants