CmdID

CmdID / PowerShell / Cmdlets / Join

Join-Path

Combines a path and a child path into a single path. PowerShell reference

From the PowerShell reference 5 parameters

Opens CmdID with your command, read as PowerShell. It is read in your browser and sent nowhere.

What it does

from the PowerShell reference, CC BY 4.0

Combines a path and a child path into a single path. The Join-Path cmdlet combines a path and child-path into a single path. The provider supplies the path delimiters.

Join-Path [-Path] <String[]> [-ChildPath] <String> [-Resolve] [-Credential <PSCredential>] [-UseTransaction] [<CommonParameters>]

Combine a path with a child path

Join-Path -Path "path" -ChildPath "childpath"Identify

Combine paths that already contain directory separators

Join-Path -Path "path\" -ChildPath "\childpath"Identify

Display files and folders by joining a path with a child path

Join-Path "C:\win*" "System*" -ResolveIdentify

Use Join-Path with the PowerShell Registry provider

PS HKLM:> Join-Path -Path System -ChildPath ControlSet -ResolveIdentify

Combine multiple path roots with a child path

Join-Path -Path C:, D:, E:, F: -ChildPath NewIdentify

Combine the roots of a file system drive with a child path

Get-PSDrive -PSProvider FileSystem | ForEach-Object {$_.Root} | Join-Path -ChildPath "Subdir"Identify

Its page in the reference: Join-Path.

Parameters

5 in the PowerShell reference
-ChildPathSpecifies the elements to append to the value of the Path parameter. Wildcards are permitted. The ChildPath parameter is required, although the parameter name ("ChildPath") is optional.
-CredentialNOTE: This parameter isn't supported by any providers installed with PowerShell. To impersonate another user, or elevate your credentials when running this cmdlet, use Invoke-Command.
-PathSpecifies the main path (or paths) to which the child-path is appended. The value of Path determines which provider joins the paths and adds the path delimiters. Wildcards are permitted.
-ResolveIndicates that this cmdlet should attempt to resolve the joined path from the current provider. - If you use wildcards, the cmdlet returns all paths that match the joined path. - If you don't use wildcards, the cmdlet returns an error if the path doesn't exist.
-UseTransactionIncludes the command in the active transaction. This parameter is valid only when a transaction is in progress. For more information, see about_Transactions.