PowerShell_Scripts/Get-Path.ps1

9 lines
171 B
PowerShell

[CmdletBinding()]param([string]$Path)
try {
get-item $Path -Force -ErrorAction Stop |
Select-Object -ExpandProperty FullName
} catch {
$_.targetObject
}