#author("2021-12-03T05:40:54+00:00","default:admin","admin") -基本的な書き方 try { : } catch { $e = $_.Exception $errLine = $_.InvocationInfo.ScriptLineNumber Write-Host -ForegroundColor Red $e at $errLine } finally { : }