PowerShell_Scripts/base/Get-Path.ps1

12 lines
267 B
PowerShell

[CmdletBinding()]param([string]$Path)
try {
if( $Path[0] -eq '@' ) {
$Path = Join-Path $MyPSScriptRoot $Path.Substring(1)
}
get-item $Path -Force -ErrorAction Stop |
Select-Object -ExpandProperty FullName
} catch {
$_.targetObject
}