Variable $item will contain the object if found. if(($item = Get-Item -Path ... -ErrorAction SilentlyContinue)) { $item } else { Write-Host "Does not exist.
確定! 回上一頁