Resolve the wildcard characters in a path and display the path contents.
Syntax Resolve-Path { [-path] string[] | [-literalPath] string[] } [-credential PSCredential] [-Relative] [-UseTransaction] [CommonParameters] Key -Path string[] The PowerShell path (or paths) to resolve Wildcards are permitted. {may be piped} -literalPath string Like Path above, only the value is used exactly as typed. No characters are interpreted as wildcards. If the path includes any escape characters then enclose the path in single quotation marks. -credential PSCredential Use a credential to validate access to the file. Credential represents a user-name, such as "User01" or "Domain01\User01", or a PSCredential object, such as the one retrieved by using the Get-Credential cmdlet. If you type a user name, you will be prompted for a password. This parameter is not supported by any PowerShell core cmdlets or providers. -Relative Return a relative path. -UseTransaction Include the command in the active transaction. CommonParameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable, -OutBuffer -OutVariable.
Standard Aliases for Resolve-Path: rvpa
Examples
Resolve the full home path represented by the tilde character (~):
PS C:\> resolve-path ~ | format-list
Return the pathnames of everything in the C:\windows\ folder:
PS C:\> resolve-path "C:\windows\*"| format-list
Resolve 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:
PS C:\> resolve-path -literalPath test[xml]
"Obstacles cannot crush me. Every obstacle yields to stern resolve. He who is fixed to a star does not change his mind" ~ Leonardo da Vinci
Related PowerShell Cmdlets:
convert-path - Convert a ps path to a provider path.
join-path - Combine a path and child-path.
split-path - Return part of a path.
test-path - Return true if the path exists, otherwise return false.
get-help about_namespace.