{"id":10361,"date":"2023-03-25T02:37:45","date_gmt":"2023-03-24T17:37:45","guid":{"rendered":"https:\/\/extan.jp\/?p=10361"},"modified":"2023-03-25T15:34:52","modified_gmt":"2023-03-25T06:34:52","slug":"powershell%e3%81%aetry-catch%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%ef%bc%81%e3%82%a8%e3%83%a9%e3%83%bc%e5%87%a6%e7%90%86%e6%96%b9%e6%b3%95%e3%82%82%e3%81%be%e3%81%a8%e3%82%81%ef%bc%81","status":"publish","type":"post","link":"https:\/\/extan.jp\/?p=10361","title":{"rendered":"PowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\uff01\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u3082\u307e\u3068\u3081\uff01"},"content":{"rendered":"<p>PowerShell\u306eTry-Catch\u306e\u610f\u5473\u3084\u4f7f\u3044\u65b9\u3092\u77e5\u308a\u305f\u3044\u3068\u304d\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u3051\u3069\u3001\u305d\u3093\u306a\u4e2d\u3067\u60a9\u3080\u3053\u3068\u306f\u3001<\/p>\n<div class=\"kininarukoto1\">\u30fbPowerShell\u306eTry-Catch\u3067\u30a8\u30e9\u30fc\u51e6\u7406\u3092\u3059\u308b\u65b9\u6cd5\u304c\u308f\u304b\u3089\u306a\u3044<br \/>\n\u30fbPowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\u304c\u308f\u304b\u3089\u306a\u3044<\/div>\n<p>\u3067\u3059\u3088\u306d\u3002<\/p>\n<p>\u4eca\u56de\u306f\u305d\u3093\u306a\u304a\u60a9\u307f\u3092\u89e3\u6c7a\u3059\u308b<\/p>\n<div class=\"rdinfo\">\u30fbPowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9<br \/>\n\u30fbPowerShell\u306eTry-Catch\u306e\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5<\/div>\n<p>\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\uff01<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_66_1 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\"><p class=\"ez-toc-title\">\u3082\u304f\u3058<\/p>\n<\/div><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/extan.jp\/?p=10361\/#PowerShell%E3%81%AETry-Catch%E3%81%AE%E6%A7%8B%E6%96%87%E3%81%AF%EF%BC%9F\" title=\"PowerShell\u306eTry-Catch\u306e\u69cb\u6587\u306f\uff1f\">PowerShell\u306eTry-Catch\u306e\u69cb\u6587\u306f\uff1f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/extan.jp\/?p=10361\/#PowerShell%E3%81%AETry-Catch%E3%81%AE%E4%BD%BF%E3%81%84%E6%96%B9%E3%81%A8%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%E3%82%B3%E3%83%BC%E3%83%89\" title=\"PowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\u3068\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\">PowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\u3068\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/extan.jp\/?p=10361\/#Catch%E3%83%96%E3%83%AD%E3%83%83%E3%82%AF%E3%81%AB%E5%BC%95%E6%95%B0%E3%82%92%E6%8C%87%E5%AE%9A%E3%81%97%E3%82%A8%E3%83%A9%E3%83%BC%E3%83%8F%E3%83%B3%E3%83%89%E3%83%AA%E3%83%B3%E3%82%B0%E3%81%99%E3%82%8B\" title=\"Catch\u30d6\u30ed\u30c3\u30af\u306b\u5f15\u6570\u3092\u6307\u5b9a\u3057\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3059\u308b\">Catch\u30d6\u30ed\u30c3\u30af\u306b\u5f15\u6570\u3092\u6307\u5b9a\u3057\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3059\u308b<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/extan.jp\/?p=10361\/#ItemNotFoundException%E3%81%AE%E4%BE%8B%E5%A4%96%E3%82%92%E3%82%AD%E3%83%A3%E3%83%83%E3%83%81\" title=\"ItemNotFoundException\u306e\u4f8b\u5916\u3092\u30ad\u30e3\u30c3\u30c1\">ItemNotFoundException\u306e\u4f8b\u5916\u3092\u30ad\u30e3\u30c3\u30c1<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/extan.jp\/?p=10361\/#ArgumentException%E3%81%AE%E4%BE%8B%E5%A4%96%E3%82%92%E3%82%AD%E3%83%A3%E3%83%83%E3%83%81\" title=\"ArgumentException\u306e\u4f8b\u5916\u3092\u30ad\u30e3\u30c3\u30c1\">ArgumentException\u306e\u4f8b\u5916\u3092\u30ad\u30e3\u30c3\u30c1<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/extan.jp\/?p=10361\/#%E3%81%A9%E3%81%AE%E4%BE%8B%E5%A4%96%E3%81%A7%E3%82%82%E3%82%AD%E3%83%A3%E3%83%83%E3%83%81\" title=\"\u3069\u306e\u4f8b\u5916\u3067\u3082\u30ad\u30e3\u30c3\u30c1\">\u3069\u306e\u4f8b\u5916\u3067\u3082\u30ad\u30e3\u30c3\u30c1<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/extan.jp\/?p=10361\/#%E3%81%95%E3%81%84%E3%81%94%E3%81%AB\" title=\"\u3055\u3044\u3054\u306b\">\u3055\u3044\u3054\u306b<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"PowerShell%E3%81%AETry-Catch%E3%81%AE%E6%A7%8B%E6%96%87%E3%81%AF%EF%BC%9F\"><\/span>PowerShell\u306eTry-Catch\u306e\u69cb\u6587\u306f\uff1f<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Try-Catch\u306f\u3001PowerShell\u306b\u304a\u3051\u308b\u30a8\u30e9\u30fc\u51e6\u7406\u306e\u69cb\u6587\u3067\u3001\u4e88\u671f\u3057\u306a\u3044\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306b\u4f8b\u5916<br \/>\n\uff08Exception\uff09\u3092\u30ad\u30e3\u30c3\u30c1\u3057\u3001\u9069\u5207\u306b\u51e6\u7406\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306fTry-Catch\u306e\u57fa\u672c\u7684\u306a\u69cb\u6587\u3067\u3059\u3002<\/p>\n<div class=\"info\"><code>try {<br \/>\n# \u3053\u3053\u306b\u51e6\u7406\u3092\u8a18\u8ff0\u3057\u307e\u3059<br \/>\n}<br \/>\ncatch {<br \/>\n# \u4f8b\u5916\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306e\u51e6\u7406\u3092\u8a18\u8ff0\u3057\u307e\u3059<br \/>\n}<\/code><\/div>\n<p>&nbsp;<\/p>\n<p>try\u30d6\u30ed\u30c3\u30af\u5185\u306b\u306f\u3001\u5b9f\u884c\u3057\u305f\u3044\u30b3\u30de\u30f3\u30c9\u3084\u51e6\u7406\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<br \/>\n\u305d\u3057\u3066try\u306e\u4e2d\u3067\u4f8b\u5916\u30a8\u30e9\u30fc\u3092\u691c\u77e5\u3057\u305f\u3044\u30b3\u30de\u30f3\u30c9\u30ec\u30c3\u30c8\u306b\u300c-ErrorAction Stop\u300d\u3092\u4ed8\u4e0e\u3057\u307e\u3059\u3002<\/p>\n<p>catch\u30d6\u30ed\u30c3\u30af\u5185\u306b\u306f\u3001\u4f8b\u5916\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306e\u51e6\u7406\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<br \/>\ncatch\u30d6\u30ed\u30c3\u30af\u306f\u7701\u7565\u53ef\u80fd\u3067\u3059\u304c\u3001catch\u30d6\u30ed\u30c3\u30af\u306e\u51e6\u7406\u304c\u306a\u3044\u5834\u5408\u306f\u4f8b\u5916\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u5b58\u5728\u3057\u306a\u3044\u30d1\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308b\u305f\u3081\u3001Get-ChildItem\u30b3\u30de\u30f3\u30c9\u304b\u3089\u4f8b\u5916\u304c\u30b9\u30ed\u30fc\u3055\u308c\u3001ErrorAction Stop\u306b\u3088\u308a\u4e2d\u65ad\u3055\u308c\u307e\u3059\u3002<br \/>\ncatch\u30d6\u30ed\u30c3\u30af\u3067\u3053\u306e\u4f8b\u5916\u3092\u30ad\u30e3\u30c3\u30c1\u3057\u3001Write-Error\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"PowerShell%E3%81%AETry-Catch%E3%81%AE%E4%BD%BF%E3%81%84%E6%96%B9%E3%81%A8%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%E3%82%B3%E3%83%BC%E3%83%89\"><\/span>PowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\u3068\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>PowerShell\u306eTry-Catch\u306eTry\u30d6\u30ed\u30c3\u30af\u306b\u306f\u3001\u30a8\u30e9\u30fc\u3092\u5f15\u304d\u8d77\u3053\u3059\u53ef\u80fd\u6027\u304c\u3042\u308b\u30b3\u30fc\u30c9\u304c\u542b\u307f\u3001<br \/>\nCatch\u30d6\u30ed\u30c3\u30af\u306f\u3001\u3053\u306e\u30a8\u30e9\u30fc\u3092\u51e6\u7406\u3059\u308b\u30b3\u30fc\u30c9\u3092\u542b\u3080\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306f\u3001\u5b58\u5728\u3057\u306a\u3044\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3053\u3046\u3068\u3057\u305f\u5834\u5408\u306b\u767a\u751f\u3059\u308b\u30a8\u30e9\u30fc\u3092\u51e6\u7406\u3057\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-powershell line-numbers\">try {\n    Get-ChildItem -Path &quot;C:UnknownFolder&quot; -ErrorAction Stop\n}\ncatch {\n    Write-Error &quot;\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\uff1a$($_.Exception.Message)&quot;\n}\n<\/code><\/pre>\n<p>\u6b21\u306bfinally\u30d6\u30ed\u30c3\u30af\u3092\u8a2d\u3051\u308b\u3068Try\u30d6\u30ed\u30c3\u30af\u306e\u6b63\u5e38\u7570\u5e38\u3092\u554f\u308f\u305a\u5f37\u5236\u7684\u306b\u51e6\u7406\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-powershell line-numbers\">try {\n    $file = Get-Content &quot;C:\\Users\\user\\OneDrive\\temp.txt&quot;  -ErrorAction Stop\n}\ncatch {\n    Write-Host &quot;\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a$($_.Exception.Message)&quot;\n}\nfinally {\n    Write-Host $file\n    Write-Host &quot;\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5b9f\u884c\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002&quot;\n}<\/code><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Catch%E3%83%96%E3%83%AD%E3%83%83%E3%82%AF%E3%81%AB%E5%BC%95%E6%95%B0%E3%82%92%E6%8C%87%E5%AE%9A%E3%81%97%E3%82%A8%E3%83%A9%E3%83%BC%E3%83%8F%E3%83%B3%E3%83%89%E3%83%AA%E3%83%B3%E3%82%B0%E3%81%99%E3%82%8B\"><\/span>Catch\u30d6\u30ed\u30c3\u30af\u306b\u5f15\u6570\u3092\u6307\u5b9a\u3057\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>PowerShell\u306eTry-Catch\u69cb\u6587\u306eCatch\u30d6\u30ed\u30c3\u30af\u306b\u5f15\u6570\u3092\u6307\u5b9a\u3059\u308b\u3068\u4e88\u671f\u3057\u306a\u3044\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3066\u3082\u3001\u67d4\u8edf\u306b\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"ItemNotFoundException%E3%81%AE%E4%BE%8B%E5%A4%96%E3%82%92%E3%82%AD%E3%83%A3%E3%83%83%E3%83%81\"><\/span>ItemNotFoundException\u306e\u4f8b\u5916\u3092\u30ad\u30e3\u30c3\u30c1<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>catch\u30d6\u30ed\u30c3\u30af\u3067\u3001ItemNotFoundException\u306e\u4f8b\u5916\u3092\u30ad\u30e3\u30c3\u30c1\u3057\u3066\u3044\u307e\u3059\u3002\u30d5\u30a1\u30a4\u30eb\u304c\u898b\u3064\u304b\u3089\u306a\u5834\u5408\u306e\u5224\u5b9a\u3067\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-powershell line-numbers\">try {\n    # \u4f8b\u5916\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u30b3\u30fc\u30c9\n    $result = Get-Item -Path &#039;C:\\Windows\\notexist.txt&#039;  -ErrorAction Stop\n}\ncatch [System.Management.Automation.ItemNotFoundException] {\n    # ItemNotFoundException\u306e\u4f8b\u5916\u3092\u30ad\u30e3\u30c3\u30c1\u3057\u305f\u5834\u5408\u306e\u51e6\u7406\n    Write-Host &quot;\u30d5\u30a1\u30a4\u30eb\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002&quot;\n}<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"ArgumentException%E3%81%AE%E4%BE%8B%E5%A4%96%E3%82%92%E3%82%AD%E3%83%A3%E3%83%83%E3%83%81\"><\/span>ArgumentException\u306e\u4f8b\u5916\u3092\u30ad\u30e3\u30c3\u30c1<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>catch\u30d6\u30ed\u30c3\u30af\u3067\u3001ArgumentException\u306e\u4f8b\u5916\u3092\u30ad\u30e3\u30c3\u30c1\u3057\u3066\u3044\u307e\u3059\u3002\u5f15\u6570\u304c\u7121\u52b9\u306e\u5834\u5408\u306e\u5224\u5b9a\u3067\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-powershell line-numbers\">try {\n    # \u4f8b\u5916\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u30b3\u30fc\u30c9\n    $result = Get-Item -Path &#039;C:\\Windows\\notexist.txt&#039;  -ErrorAction Stop\n}\ncatch [System.ArgumentException] {\n    # ArgumentException\u306e\u4f8b\u5916\u3092\u30ad\u30e3\u30c3\u30c1\u3057\u305f\u5834\u5408\u306e\u51e6\u7406\n    Write-Host &quot;\u5f15\u6570\u304c\u7121\u52b9\u3067\u3059\u3002&quot;\n}<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%E3%81%A9%E3%81%AE%E4%BE%8B%E5%A4%96%E3%81%A7%E3%82%82%E3%82%AD%E3%83%A3%E3%83%83%E3%83%81\"><\/span>\u3069\u306e\u4f8b\u5916\u3067\u3082\u30ad\u30e3\u30c3\u30c1<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>catch\u30d6\u30ed\u30c3\u30af\u3067\u5f15\u6570\u6307\u5b9a\u304c\u306a\u3044\u5834\u5408\u306f\u3001\u3069\u306e\u4f8b\u5916\u3067\u3082\u30ad\u30e3\u30c3\u30c1\u3067\u304d\u308b\u4e00\u822c\u7684\u306acatch\u30d6\u30ed\u30c3\u30af\u5224\u5b9a\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-powershell line-numbers\">try {\n    # \u4f8b\u5916\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u30b3\u30fc\u30c9\n    $result = Get-Item -Path &#039;C:\\Windows\\notexist.txt&#039;  -ErrorAction Stop\n}\ncatch {\n    # \u305d\u306e\u4ed6\u306e\u4f8b\u5916\u3092\u30ad\u30e3\u30c3\u30c1\u3057\u305f\u5834\u5408\u306e\u51e6\u7406\n    Write-Host &quot;\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002&quot;\n}<\/code><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"%E3%81%95%E3%81%84%E3%81%94%E3%81%AB\"><\/span>\u3055\u3044\u3054\u306b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001<\/p>\n<div class=\"endinfo\">\u30fbPowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9<br \/>\n\u30fbPowerShell\u306eTry-Catch\u306e\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5<\/div>\n<p>\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305f\u3001\u4ed6\u306b\u3082\u4fbf\u5229\u306a\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u3088\u308d\u3057\u3051\u308c\u3070\u3054\u53c2\u7167\u9802\u3051\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PowerShell\u306eTry-Catch\u306e\u610f\u5473\u3084\u4f7f\u3044\u65b9\u3092\u77e5\u308a\u305f\u3044\u3068\u304d\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002 \u3051\u3069\u3001\u305d\u3093\u306a\u4e2d\u3067\u60a9\u3080\u3053\u3068\u306f\u3001 \u30fbPowerShell\u306eTry-Catch\u3067\u30a8\u30e9\u30fc\u51e6\u7406\u3092\u3059\u308b\u65b9\u6cd5\u304c\u308f\u304b\u3089\u306a\u3044 \u30fbPowerShell\u306e&#8230;<\/p>\n","protected":false},"author":1,"featured_media":10244,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[204],"tags":[203],"class_list":{"0":"post-10361","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-powershell","8":"tag-powershell","9":"article cf"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<meta name=\"description\" content=\"\u30fbPowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\u30fbPowerShell\u306eTry-Catch\u306e\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/extan.jp\/?p=10361\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\uff01\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u3082\u307e\u3068\u3081\uff01 - \u30a8\u30af\u77ed\uff5cExtan.jp\" \/>\n<meta property=\"og:description\" content=\"\u30fbPowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\u30fbPowerShell\u306eTry-Catch\u306e\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/extan.jp\/?p=10361\" \/>\n<meta property=\"og:site_name\" content=\"\u30a8\u30af\u77ed\uff5cExtan.jp\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-24T17:37:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-25T06:34:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/12\/powershell.png\" \/>\n\t<meta property=\"og:image:width\" content=\"857\" \/>\n\t<meta property=\"og:image:height\" content=\"607\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u30bf\u30ab\u30d2\u30ed@extan\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"6\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/extan.jp\/#website\",\"url\":\"https:\/\/extan.jp\/\",\"name\":\"\u30a8\u30af\u77ed\uff5cExtan.jp\",\"description\":\"\u50cd\u304f\u4eba\u306e\u81ea\u7531\u6642\u9593\u3092\u3064\u304f\u308b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/extan.jp\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ja\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/extan.jp\/?p=10361#primaryimage\",\"inLanguage\":\"ja\",\"url\":\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/12\/powershell.png\",\"contentUrl\":\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/12\/powershell.png\",\"width\":857,\"height\":607,\"caption\":\"powershell\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/extan.jp\/?p=10361#webpage\",\"url\":\"https:\/\/extan.jp\/?p=10361\",\"name\":\"PowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\uff01\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u3082\u307e\u3068\u3081\uff01 - \u30a8\u30af\u77ed\uff5cExtan.jp\",\"isPartOf\":{\"@id\":\"https:\/\/extan.jp\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/extan.jp\/?p=10361#primaryimage\"},\"datePublished\":\"2023-03-24T17:37:45+00:00\",\"dateModified\":\"2023-03-25T06:34:52+00:00\",\"author\":{\"@id\":\"https:\/\/extan.jp\/#\/schema\/person\/ccb8849fcf749d5f74439b1af7d4df1a\"},\"description\":\"\u30fbPowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\u30fbPowerShell\u306eTry-Catch\u306e\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/extan.jp\/?p=10361#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/extan.jp\/?p=10361\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/extan.jp\/?p=10361#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\/\/extan.jp\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\uff01\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u3082\u307e\u3068\u3081\uff01\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/extan.jp\/#\/schema\/person\/ccb8849fcf749d5f74439b1af7d4df1a\",\"name\":\"\u30bf\u30ab\u30d2\u30ed@extan\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/extan.jp\/#personlogo\",\"inLanguage\":\"ja\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g\",\"caption\":\"\u30bf\u30ab\u30d2\u30ed@extan\"},\"url\":\"https:\/\/extan.jp\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"description":"\u30fbPowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\u30fbPowerShell\u306eTry-Catch\u306e\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/extan.jp\/?p=10361","og_locale":"ja_JP","og_type":"article","og_title":"PowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\uff01\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u3082\u307e\u3068\u3081\uff01 - \u30a8\u30af\u77ed\uff5cExtan.jp","og_description":"\u30fbPowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\u30fbPowerShell\u306eTry-Catch\u306e\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002","og_url":"https:\/\/extan.jp\/?p=10361","og_site_name":"\u30a8\u30af\u77ed\uff5cExtan.jp","article_published_time":"2023-03-24T17:37:45+00:00","article_modified_time":"2023-03-25T06:34:52+00:00","og_image":[{"width":857,"height":607,"url":"https:\/\/extan.jp\/wp-content\/uploads\/2022\/12\/powershell.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u30bf\u30ab\u30d2\u30ed@extan","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"6\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/extan.jp\/#website","url":"https:\/\/extan.jp\/","name":"\u30a8\u30af\u77ed\uff5cExtan.jp","description":"\u50cd\u304f\u4eba\u306e\u81ea\u7531\u6642\u9593\u3092\u3064\u304f\u308b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/extan.jp\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ja"},{"@type":"ImageObject","@id":"https:\/\/extan.jp\/?p=10361#primaryimage","inLanguage":"ja","url":"https:\/\/extan.jp\/wp-content\/uploads\/2022\/12\/powershell.png","contentUrl":"https:\/\/extan.jp\/wp-content\/uploads\/2022\/12\/powershell.png","width":857,"height":607,"caption":"powershell"},{"@type":"WebPage","@id":"https:\/\/extan.jp\/?p=10361#webpage","url":"https:\/\/extan.jp\/?p=10361","name":"PowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\uff01\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u3082\u307e\u3068\u3081\uff01 - \u30a8\u30af\u77ed\uff5cExtan.jp","isPartOf":{"@id":"https:\/\/extan.jp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/extan.jp\/?p=10361#primaryimage"},"datePublished":"2023-03-24T17:37:45+00:00","dateModified":"2023-03-25T06:34:52+00:00","author":{"@id":"https:\/\/extan.jp\/#\/schema\/person\/ccb8849fcf749d5f74439b1af7d4df1a"},"description":"\u30fbPowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\u30fbPowerShell\u306eTry-Catch\u306e\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/extan.jp\/?p=10361#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/extan.jp\/?p=10361"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/extan.jp\/?p=10361#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/extan.jp\/"},{"@type":"ListItem","position":2,"name":"PowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\uff01\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u3082\u307e\u3068\u3081\uff01"}]},{"@type":"Person","@id":"https:\/\/extan.jp\/#\/schema\/person\/ccb8849fcf749d5f74439b1af7d4df1a","name":"\u30bf\u30ab\u30d2\u30ed@extan","image":{"@type":"ImageObject","@id":"https:\/\/extan.jp\/#personlogo","inLanguage":"ja","url":"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g","caption":"\u30bf\u30ab\u30d2\u30ed@extan"},"url":"https:\/\/extan.jp\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts\/10361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10361"}],"version-history":[{"count":13,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts\/10361\/revisions"}],"predecessor-version":[{"id":10862,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts\/10361\/revisions\/10862"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/media\/10244"}],"wp:attachment":[{"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}