PowerShell Logo Small

Resolve-Path



This is the built-in help made by Microsoft for the command 'Resolve-Path', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Resolves the wildcard characters in a path, and displays the path contents.

SYNTAX


Resolve-Path [-Path] <String[]> [-Credential [<PSCredential>]] [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable
[<System.String>]] [-Relative] [-UseTransaction [<SwitchParameter>]] [<CommonParameters>]
Resolve-Path [-Credential [<PSCredential>]] [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]]
[-Relative] -LiteralPath <String[]> [-UseTransaction [<SwitchParameter>]] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Resolve-Path cmdlet interprets the wildcard characters in a path and displays the items and containers at the location specified by the path, such as the files and
folders or registry keys and subkeys.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=293904
Convert-Path
Join-Path
Split-Path
Test-Path
about_Providers

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

PS C:\>resolve-path ~
C:\Users\User01



This command resolves the path represented by the tilde character (~), which represents the home path of a file system drive, such as C:.










-------------------------- EXAMPLE 2 --------------------------

PS C:\>resolve-path windows
C:\Windows



When run from the root of the C: drive, this command returns the path to the Windows directory in the C: drive.










-------------------------- EXAMPLE 3 --------------------------

PS C:\>"C:\windows\*" | resolve-path



This command returns all of the directories in the C:\Windows directory. The command uses a pipeline operator (|) to send a path string to Resolve-Path.










-------------------------- EXAMPLE 4 --------------------------

PS C:\>resolve-path \\Server01\public



This command resolves a Universal Naming Convention (UNC) path and returns the shares in the path.










-------------------------- EXAMPLE 5 --------------------------

PS C:\>resolve-path c:\prog* -relative
..\Program Files
..\Program Files (x86)
..\programs.txt



This command returns relative paths for the directories at the root of the C: drive.










-------------------------- EXAMPLE 6 --------------------------

PS C:\>resolve-path -literalPath test[xml]



This command resolves the path to the Test[xml] subdirectory of the current directory. It uses the LiteralPath parameter to indicate that the brackets are not regular
expression characters.