Resolve-Path

Resolve the wildcard characters in a path and display the path contents.

Syntax
      Resolve-Path { [-path] string[] | [-literalPath] string[] }
               [-credential PSCredential] [CommonParameters]

Key
   -Path string[]
       The main 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.

   CommonParameters:
      -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutVariable.

Examples

Resolve the full home path:

PS C:\>resolve-path ~ | format-list

Return the pathnames of everything in the C:\windows\ folder:

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

"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 Commands:

convert-path cvpa 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



Back to the Top

© Copyright SS64.com 1999-2010
Some rights reserved