Convert-Path
Additional Resources for Convert-Path |
Translating a Windows PowerShell Path http://www.microsoft.com/technet/scriptcenter/topics/msh/cmdlets/convert-path.mspx
|
SYNOPSIS
Converts a path from a Windows PowerShell path to a Windows PowerShell provider path.
SYNTAX
Convert-Path [-path] <string[]> [<CommonParameters>]
Convert-Path [-literalPath] <string[]> [<CommonParameters>]
DETAILED DESCRIPTION
Converts a path from a Windows PowerShell path to a Windows PowerShell provider path.
PARAMETERS
-path <string[]>
Specifies the Windows PowerShell path to be converted.
Required? |
true |
Position? |
1 |
Default value |
N/A - The path must be specified |
Accept pipeline input? |
true (ByValue, ByPropertyName) |
Accept wildcard characters? |
true |
-literalPath <string[]>
Specifies the path to be converted. The value of -LiteralPath is used exactly as it is typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell Windows PowerShell not to interpret any characters as escape sequences.
Required? |
true |
Position? |
1 |
Default value |
|
Accept pipeline input? |
true (ByPropertyName) |
Accept wildcard characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. For more information, type, "get-help about_commonparameters".
INPUT TYPE
String
RETURN TYPE
String
NOTES
For more information, type "Get-Help Convert-Path -detailed". For technical information, type "Get-Help Convert-Path -full".
The path cmdlets (*-path) manipulate path names and return the names in a concise format that all Windows PowerShell providers can interpret. They are designed for use in programs and scripts where you want to display all or part of a path name in a particular format. Use them like you would use Dirname, Normpath, Realpath, Join, or other path manipulators.
You can use the path cmdlets with several providers, including the FileSystem, Registry, and Certificate providers.
When specifying multiple values for a parameter, use commas to separate the values. For example, "<parameter-name> <value1>, <value2>".
EXAMPLE 1
convert-path ~
This command expands the current working directory.
EXAMPLE 2
convert-path HKLM:\software\microsoft
This command converts the Windows PowerShell provider path to a standard registry path.
RELATED LINKS