Test if specified path actually exists
$path = "C:\Windows" try { if (Test-Path $path -ErrorAction Stop) { Write-Output "Path exits" } else { Write-Output "Path not found" } } catch { Write-Error $_ }