PowerShell_Scripts/Get-Path.ps1

9 строки
171 B
PowerShell

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