{"id":3726,"date":"2018-06-01T08:31:01","date_gmt":"2018-05-31T23:31:01","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=3726"},"modified":"2023-05-28T08:48:59","modified_gmt":"2023-05-27T23:48:59","slug":"%e3%80%90powershell%e3%80%91hello-world%e3%82%92%e5%ae%9f%e8%a1%8c%e3%81%99%e3%82%8b%e3%80%82","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=3726","title":{"rendered":"\u3010PowerShell\u3011\u6a29\u9650\uff08\u5b9f\u884c\u30dd\u30ea\u30b7\u30fc\uff09\u306e\u8a2d\u5b9a\u3092\u3059\u308b\u3002"},"content":{"rendered":"<p>\u305d\u3082\u305d\u3082\u3001PowerShell\u3092\u5b9f\u884c\u3059\u308b\u306b\u306f\u3001\u307e\u305a\u306f<span style=\"color: #ff0000;\"><strong>\u300c\u5b9f\u884c\u30dd\u30ea\u30b7\u30fc\u300d<\/strong><\/span>\u3068\u3044\u3046\u6a29\u9650\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u73fe\u5728\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5b9f\u884c\u30dd\u30ea\u30b7\u30fc\u3092\u78ba\u8a8d\u3059\u308b\u3002<\/h2>\n<p><span style=\"color: #ff0000;\"><strong>\u300cGet-ExecutionPolicy\u300d<\/strong><\/span>\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u73fe\u5728\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5b9f\u884c\u30dd\u30ea\u30b7\u30fc\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3728\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/06\/\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30dd\u30ea\u30b7\u30fc.png\" alt=\"\" width=\"477\" height=\"42\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/06\/\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30dd\u30ea\u30b7\u30fc.png 477w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/06\/\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30dd\u30ea\u30b7\u30fc-300x26.png 300w\" sizes=\"(max-width: 477px) 100vw, 477px\" \/><\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3060\u3068\u3001\u300cRestricted\u300d\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001\u3053\u306e\u8a2d\u5b9a\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u300c\u5168\u304f\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u884c\u3092\u884c\u3048\u306a\u3044\u300d<\/strong><\/span>\u3068\u3044\u3046\u8a2d\u5b9a\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u5b9f\u884c\u30dd\u30ea\u30b7\u30fc\u306e\u7a2e\u985e<\/h2>\n<table>\n<tbody>\n<tr>\n<th>\u5b9f\u884c\u30dd\u30ea\u30b7\u30fc<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>Restricted<\/td>\n<td>\u69cb\u6210\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u8fbc\u307f\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u884c\u3092\u884c\u308f\u306a\u3044\u3002<\/td>\n<\/tr>\n<tr>\n<td>AllSigned<\/td>\n<td>\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u3001\u4fe1\u983c\u3055\u308c\u305f\u767a\u884c\u5143\u306b\u3088\u3063\u3066\u30c7\u30b8\u30bf\u30eb\u7f72\u540d\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306e\u307f\u306b\u5b9f\u884c\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>RemoteSigned<\/td>\n<td>\u30cd\u30c3\u30c8\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u5168\u3066\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u4fe1\u983c\u3055\u308c\u305f\u767a\u884c\u5143\u306b\u3088\u3063\u3066\u3001\u30c7\u30b8\u30bf\u30eb\u7f72\u540d\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306e\u307f\u306b\u5b9f\u884c\u3057\u307e\u3059\u3002\uff08<span style=\"color: #ff0000;\"><strong>\u8981\u306f\u3001\u81ea\u4f5c\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u5168\u3066\u5b9f\u884c\u3067\u304d\u307e\u3059\u3088\u3068\u3044\u3046\u610f\u5473\u3067\u3059\u3002<\/strong><span style=\"color: #000000;\">\uff09<\/span><\/span><\/td>\n<\/tr>\n<tr>\n<td>Unrestricted<\/td>\n<td>\u5168\u3066\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002(\u30c7\u30b8\u30bf\u30eb\u7f72\u540d\u3055\u308c\u3066\u3044\u306a\u3044\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5834\u5408\u306f\u3001\u5b9f\u884c\u524d\u306b\u78ba\u8a8d\u3057\u307e\u3059\u3002)\u3001\u8981\u306f<span style=\"color: #ff0000;\"><strong>\u30cd\u30c3\u30c8\u4e0a\u3067\u4ed6\u4eba\u304c\u4f5c\u6210\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3082\u5b9f\u884c\u3067\u304d\u307e\u3059\u3088\u3068\u3044\u3046\u610f\u5473<\/strong><\/span>\u3067\u3059\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u5b9f\u884c\u30dd\u30ea\u30b7\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/h2>\n<p>\u5b9f\u884c\u30dd\u30ea\u30b7\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u300cSet<\/strong><strong><span style=\"color: #ff0000;\">-<\/span>ExecutionPolicy\u300d\u30b3\u30de\u30f3\u30c9<\/strong><\/span>\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001\u305d\u306e\u307e\u307e\u5b9f\u884c\u3059\u308b\u3068\u3001\u30d1\u30bd\u30b3\u30f3\u5168\u4f53\u306e\u8a2d\u5b9a\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u4e0b\u8a18\u306e\u3088\u3046\u306b\u6307\u5b9a\u3059\u308c\u3070\u3001<span style=\"color: #ff0000;\"><strong>\u73fe\u5728\u30ed\u30b0\u30aa\u30f3\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc\u306e\u307f\u3001\u5168\u3066\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3067\u304d\u308b<\/strong><\/span>\u3068\u3044\u3046\u5b9f\u884c\u30dd\u30ea\u30b7\u30fc\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted<\/pre>\n<p>\u4e0a\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u5f8c\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u3001\u5b9f\u884c\u30dd\u30ea\u30b7\u30fc\u304c<span style=\"color: #ff0000;\"><strong>\u300cUnrestricted\u300d<\/strong><\/span>\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3749\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/06\/\u5b9f\u884c\u5f8c.png\" alt=\"\" width=\"469\" height=\"41\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/06\/\u5b9f\u884c\u5f8c.png 469w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/06\/\u5b9f\u884c\u5f8c-300x26.png 300w\" sizes=\"(max-width: 469px) 100vw, 469px\" \/><\/p>\n<h2>\u305d\u3082\u305d\u3082\u4f55\u3067\u3001\u300c\u5b9f\u884c\u30dd\u30ea\u30b7\u30fc\u300d\u306a\u3093\u3066\u3042\u308b\u306e\uff1f<\/h2>\n<p>\u80cc\u666f\u3068\u3057\u3066\u306f\u3001VBS\u3084\u3001Jscript\u7b49\u306eWSH(Windows Scripting Host\uff09\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3042\u308c\u3089\u306f\u3001\u30e1\u30e2\u5e33\u7b49\u3067\u4f5c\u6210\u3057\u3066\u3001\u62e1\u5f35\u5b50\u3092\u300c.vbs\u300d\u3084\u300c.js\u300d\u306b\u66f8\u304d\u63db\u3048\u308b\u3060\u3051\u3067\u7c21\u5358\u306bWidows\u3092\u64cd\u4f5c\u3067\u304d\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3068\u5171\u306b\u3001Windows\u306e\u666e\u53ca\u306b\u3064\u308c\u3066\u3001\u60aa\u610f\u306e\u3042\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3082\u975e\u5e38\u306b\u591a\u304f\u5e83\u304c\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002\uff08\u30e1\u30fc\u30eb\u3084\u3001Web\u306b\u6dfb\u4ed8\u3055\u308c\u305f\u3082\u306e\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u88ab\u5bb3\u306b\u3042\u3046\u306a\u3093\u3066\u4e8b\u4ef6\u3082\u591a\u767a\u3057\u307e\u3057\u305f\u3002\uff09<\/p>\n<p>\u305d\u306e\u5b89\u6613\u306b\u5b9f\u884c\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306bMicrosoft\u304c\u53d6\u3063\u305f\u5bfe\u7b56\u304c<span style=\"color: #ff0000;\"><strong>\u300c\u5b9f\u884c\u30dd\u30ea\u30b7\u30fc\u300d<\/strong><\/span>\u3068\u3044\u3046\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u305d\u3082\u305d\u3082\u3001PowerShell\u3092\u5b9f\u884c\u3059\u308b\u306b\u306f\u3001\u307e\u305a\u306f\u300c\u5b9f\u884c\u30dd\u30ea\u30b7\u30fc\u300d\u3068\u3044\u3046\u6a29\u9650\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002 \u73fe\u5728\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5b9f\u884c\u30dd\u30ea\u30b7\u30fc\u3092\u78ba\u8a8d\u3059\u308b\u3002 \u300cGet-ExecutionPolicy\u300d\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u73fe\u5728\u8a2d\u5b9a [&hellip;]","protected":false},"author":1,"featured_media":3712,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[158],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/3726"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3726"}],"version-history":[{"count":11,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/3726\/revisions"}],"predecessor-version":[{"id":20800,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/3726\/revisions\/20800"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/media\/3712"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3726"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}