Document the renamed `-BasePath` parameter (formerly `-RelativeBasePath`) of Resolve-Path

Open Beginner friendly
#13,379 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@soroshsabz is already working on this.

Since Nov 8, 2026.

  • #13380 by @soroshsabz — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
79/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
powershell
Domain
documentation

Research direction

Start with reference/7.7/Microsoft.PowerShell.Management/Resolve-Path.md. Update the parameter heading and YAML alias, then change the syntax blocks and Example 7 to use -BasePath; include the PowerShell 7.7 rename and backwards compatibility details from the issue. Done when the reference documents the new name and alias consistently.

Written by the indexing model from the issue text.

Description

Prerequisites
  • Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Document new Get-Foo cmdlet" instead of "New cmdlet."
Summary

PowerShell is renaming the -RelativeBasePath parameter of Resolve-Path to -BasePath in PowerShell 7.7. The original -RelativeBasePath name remains available as a parameter alias for backwards compatibility. The cmdlet reference needs to document the new parameter name and the alias.

Details

The rename was proposed in PowerShell/PowerShell#20937: the name -RelativeBasePath tempted users to assume the parameter only works together with the -Relative switch (or that it implies -Relative), and a distinct shorter name is easier to tab-complete. The parameter was added in PowerShell 7.4 as -RelativeBasePath and is renamed to -BasePath in PowerShell 7.7.

The parameter resolves the -Path or -LiteralPath values relative to the given base path: without -Relative the cmdlet returns PathInfo objects for the resolved paths; with -Relative it returns a string representing the relative path from the base path to the resolved paths.

Articles
  • Resolve-Path (reference/7.7/Microsoft.PowerShell.Management/Resolve-Path.md)

Suggested updates:

  1. Rename the ### -RelativeBasePath parameter section to ### -BasePath, list RelativeBasePath as an alias in the yaml block, and note the rename in PowerShell 7.7.
  2. Update the SYNTAX blocks and Example 7 (Resolve a path relative to another folder) to use -BasePath.
Suggested content

Parameter description for -BasePath:

Specifies a path to resolve the path from. When you use this parameter, the cmdlet resolves the value of the Path or LiteralPath parameter relative to the base path and returns the System.Management.Automation.PathInfo object for the resolved path.

When you use this parameter with the Relative switch parameter, the cmdlet returns a string representing the relative path from BasePath to Path.

This parameter was added in PowerShell 7.4 as RelativeBasePath and renamed to BasePath in PowerShell 7.7. The original parameter name remains available as an alias for backwards compatibility.

Example:

$ExecutablePath = Get-Command -Name pwsh | Select-Object -ExpandProperty Source
Resolve-Path -Path $ExecutablePath -BasePath $Env:TEMP -Relative
Related Source Pull Requests
Related Source Issues
Dominant language
PowerShell
Stars
2.6k
Forks
1.7k
Avg merge
1d 4h
Merged PRs (30d)
4

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MicrosoftDocs/PowerShell-Docs

All issues in MicrosoftDocs/PowerShell-Docs

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.