{"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_85 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u3082\u304f\u3058<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<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\" >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\" >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\" >Catch\u30d6\u30ed\u30c3\u30af\u306b\u5f15\u6570\u3092\u6307\u5b9a\u3057\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3059\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/extan.jp\/?p=10361\/#%E3%81%95%E3%81%84%E3%81%94%E3%81%AB\" >\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>ItemNotFoundException\u306e\u4f8b\u5916\u3092\u30ad\u30e3\u30c3\u30c1<\/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>ArgumentException\u306e\u4f8b\u5916\u3092\u30ad\u30e3\u30c3\u30c1<\/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>\u3069\u306e\u4f8b\u5916\u3067\u3082\u30ad\u30e3\u30c3\u30c1<\/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"},"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"\u30bf\u30ab\u30d2\u30ed@extan\"\/>\n\t<meta name=\"keywords\" content=\"powershell\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/extan.jp\/?p=10361\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"ja_JP\" \/>\n\t\t<meta property=\"og:site_name\" content=\"\u30a8\u30af\u77ed\uff5cExtan.jp\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<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\t\t<meta property=\"og:url\" content=\"https:\/\/extan.jp\/?p=10361\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-03-24T17:37:45+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-03-25T06:34:52+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter: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\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=10361#article\",\"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\",\"headline\":\"PowerShell\\u306eTry-Catch\\u306e\\u4f7f\\u3044\\u65b9\\uff01\\u30a8\\u30e9\\u30fc\\u51e6\\u7406\\u65b9\\u6cd5\\u3082\\u307e\\u3068\\u3081\\uff01\",\"author\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/?author=1#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/extan.jp\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/powershell.png\",\"width\":857,\"height\":607,\"caption\":\"powershell\"},\"datePublished\":\"2023-03-25T02:37:45+09:00\",\"dateModified\":\"2023-03-25T15:34:52+09:00\",\"inLanguage\":\"ja\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=10361#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=10361#webpage\"},\"articleSection\":\"PowerShell, PowerShell\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=10361#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp#listItem\",\"position\":1,\"name\":\"\\u30db\\u30fc\\u30e0\",\"item\":\"https:\\\/\\\/extan.jp\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?cat=47#listItem\",\"name\":\"Microsoft 365\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?cat=47#listItem\",\"position\":2,\"name\":\"Microsoft 365\",\"item\":\"https:\\\/\\\/extan.jp\\\/?cat=47\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?cat=204#listItem\",\"name\":\"PowerShell\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp#listItem\",\"name\":\"\\u30db\\u30fc\\u30e0\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?cat=204#listItem\",\"position\":3,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/extan.jp\\\/?cat=204\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=10361#listItem\",\"name\":\"PowerShell\\u306eTry-Catch\\u306e\\u4f7f\\u3044\\u65b9\\uff01\\u30a8\\u30e9\\u30fc\\u51e6\\u7406\\u65b9\\u6cd5\\u3082\\u307e\\u3068\\u3081\\uff01\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?cat=47#listItem\",\"name\":\"Microsoft 365\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=10361#listItem\",\"position\":4,\"name\":\"PowerShell\\u306eTry-Catch\\u306e\\u4f7f\\u3044\\u65b9\\uff01\\u30a8\\u30e9\\u30fc\\u51e6\\u7406\\u65b9\\u6cd5\\u3082\\u307e\\u3068\\u3081\\uff01\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?cat=204#listItem\",\"name\":\"PowerShell\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/extan.jp\\\/#organization\",\"name\":\"\\u30a8\\u30af\\u77ed\\uff5cExtan.jp\",\"description\":\"\\u50cd\\u304f\\u4eba\\u306e\\u81ea\\u7531\\u6642\\u9593\\u3092\\u3064\\u304f\\u308b\",\"url\":\"https:\\\/\\\/extan.jp\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?author=1#author\",\"url\":\"https:\\\/\\\/extan.jp\\\/?author=1\",\"name\":\"\\u30bf\\u30ab\\u30d2\\u30ed@extan\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=10361#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"\\u30bf\\u30ab\\u30d2\\u30ed@extan\"}},{\"@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\",\"inLanguage\":\"ja\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=10361#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/?author=1#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/?author=1#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/extan.jp\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/powershell.png\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=10361\\\/#mainImage\",\"width\":857,\"height\":607,\"caption\":\"powershell\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=10361#mainImage\"},\"datePublished\":\"2023-03-25T02:37:45+09:00\",\"dateModified\":\"2023-03-25T15:34:52+09:00\"},{\"@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\",\"inLanguage\":\"ja\",\"publisher\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"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","description":"","canonical_url":"https:\/\/extan.jp\/?p=10361","robots":"max-image-preview:large","keywords":"powershell","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/extan.jp\/?p=10361#article","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","headline":"PowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\uff01\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u3082\u307e\u3068\u3081\uff01","author":{"@id":"https:\/\/extan.jp\/?author=1#author"},"publisher":{"@id":"https:\/\/extan.jp\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/extan.jp\/wp-content\/uploads\/2022\/12\/powershell.png","width":857,"height":607,"caption":"powershell"},"datePublished":"2023-03-25T02:37:45+09:00","dateModified":"2023-03-25T15:34:52+09:00","inLanguage":"ja","mainEntityOfPage":{"@id":"https:\/\/extan.jp\/?p=10361#webpage"},"isPartOf":{"@id":"https:\/\/extan.jp\/?p=10361#webpage"},"articleSection":"PowerShell, PowerShell"},{"@type":"BreadcrumbList","@id":"https:\/\/extan.jp\/?p=10361#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/extan.jp#listItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/extan.jp","nextItem":{"@type":"ListItem","@id":"https:\/\/extan.jp\/?cat=47#listItem","name":"Microsoft 365"}},{"@type":"ListItem","@id":"https:\/\/extan.jp\/?cat=47#listItem","position":2,"name":"Microsoft 365","item":"https:\/\/extan.jp\/?cat=47","nextItem":{"@type":"ListItem","@id":"https:\/\/extan.jp\/?cat=204#listItem","name":"PowerShell"},"previousItem":{"@type":"ListItem","@id":"https:\/\/extan.jp#listItem","name":"\u30db\u30fc\u30e0"}},{"@type":"ListItem","@id":"https:\/\/extan.jp\/?cat=204#listItem","position":3,"name":"PowerShell","item":"https:\/\/extan.jp\/?cat=204","nextItem":{"@type":"ListItem","@id":"https:\/\/extan.jp\/?p=10361#listItem","name":"PowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\uff01\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u3082\u307e\u3068\u3081\uff01"},"previousItem":{"@type":"ListItem","@id":"https:\/\/extan.jp\/?cat=47#listItem","name":"Microsoft 365"}},{"@type":"ListItem","@id":"https:\/\/extan.jp\/?p=10361#listItem","position":4,"name":"PowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\uff01\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u3082\u307e\u3068\u3081\uff01","previousItem":{"@type":"ListItem","@id":"https:\/\/extan.jp\/?cat=204#listItem","name":"PowerShell"}}]},{"@type":"Organization","@id":"https:\/\/extan.jp\/#organization","name":"\u30a8\u30af\u77ed\uff5cExtan.jp","description":"\u50cd\u304f\u4eba\u306e\u81ea\u7531\u6642\u9593\u3092\u3064\u304f\u308b","url":"https:\/\/extan.jp\/"},{"@type":"Person","@id":"https:\/\/extan.jp\/?author=1#author","url":"https:\/\/extan.jp\/?author=1","name":"\u30bf\u30ab\u30d2\u30ed@extan","image":{"@type":"ImageObject","@id":"https:\/\/extan.jp\/?p=10361#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g","width":96,"height":96,"caption":"\u30bf\u30ab\u30d2\u30ed@extan"}},{"@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","inLanguage":"ja","isPartOf":{"@id":"https:\/\/extan.jp\/#website"},"breadcrumb":{"@id":"https:\/\/extan.jp\/?p=10361#breadcrumblist"},"author":{"@id":"https:\/\/extan.jp\/?author=1#author"},"creator":{"@id":"https:\/\/extan.jp\/?author=1#author"},"image":{"@type":"ImageObject","url":"https:\/\/extan.jp\/wp-content\/uploads\/2022\/12\/powershell.png","@id":"https:\/\/extan.jp\/?p=10361\/#mainImage","width":857,"height":607,"caption":"powershell"},"primaryImageOfPage":{"@id":"https:\/\/extan.jp\/?p=10361#mainImage"},"datePublished":"2023-03-25T02:37:45+09:00","dateModified":"2023-03-25T15:34:52+09:00"},{"@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","inLanguage":"ja","publisher":{"@id":"https:\/\/extan.jp\/#organization"}}]},"og:locale":"ja_JP","og:site_name":"\u30a8\u30af\u77ed\uff5cExtan.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:url":"https:\/\/extan.jp\/?p=10361","article:published_time":"2023-03-24T17:37:45+00:00","article:modified_time":"2023-03-25T06:34:52+00:00","twitter:card":"summary","twitter: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"},"aioseo_meta_data":{"post_id":"10361","title":null,"description":null,"keywords":null,"keyphrases":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_custom_image_width":null,"og_custom_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"created":"2026-06-24 15:27:58","updated":"2026-06-24 15:27:58","primary_term":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"twitter_image_url":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/extan.jp\" title=\"\u30db\u30fc\u30e0\">\u30db\u30fc\u30e0<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/extan.jp\/?cat=47\" title=\"Microsoft 365\">Microsoft 365<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/extan.jp\/?cat=204\" title=\"PowerShell\">PowerShell<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tPowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\uff01\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u3082\u307e\u3068\u3081\uff01\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"\u30db\u30fc\u30e0","link":"https:\/\/extan.jp"},{"label":"Microsoft 365","link":"https:\/\/extan.jp\/?cat=47"},{"label":"PowerShell","link":"https:\/\/extan.jp\/?cat=204"},{"label":"PowerShell\u306eTry-Catch\u306e\u4f7f\u3044\u65b9\uff01\u30a8\u30e9\u30fc\u51e6\u7406\u65b9\u6cd5\u3082\u307e\u3068\u3081\uff01","link":"https:\/\/extan.jp\/?p=10361"}],"_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}]}}