Created
February 13, 2011 02:41
-
-
Save jstangroome/824371 to your computer and use it in GitHub Desktop.
Converts relative paths to absolute paths but does not require the path to exist.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-AbsolutePath { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] | |
[string[]] | |
$Path | |
) | |
process { | |
$Path | ForEach-Object { | |
$PSCmdlet.SessionState.Path.GetUnresolvedProviderPathFromPSPath($_) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment