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