{"id":10735,"date":"2023-08-08T12:44:12","date_gmt":"2023-08-08T04:44:12","guid":{"rendered":"https:\/\/blog.iyatt.com\/?p=10735"},"modified":"2024-05-09T17:23:25","modified_gmt":"2024-05-09T09:23:25","slug":"powershell-%e5%85%81%e8%ae%b8%e8%84%9a%e6%9c%ac%e8%bf%90%e8%a1%8c","status":"publish","type":"post","link":"https:\/\/blog.iyatt.com\/?p=10735","title":{"rendered":"PowerShell \u5141\u8bb8\u811a\u672c\u8fd0\u884c"},"content":{"rendered":"<p>Windows \u4e0a PowerShell \u9ed8\u8ba4\u662f\u7981\u6b62\u6267\u884c\u811a\u672c\u6587\u4ef6\u7684<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2023\/08\/image-1691469297525.png\" alt=\"\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 1107px; --smush-placeholder-aspect-ratio: 1107\/164;\" \/><\/p>\n<p>\u53ef\u4ee5\u4fee\u6539\u6267\u884c\u7b56\u7565\u5141\u8bb8\u811a\u672c\u8fd0\u884c\u3002\u4ee5\u7ba1\u7406\u5458\u6743\u9650\u6253\u5f00 PowerShell<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2023\/08\/image-1691469473432.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 448px; --smush-placeholder-aspect-ratio: 448\/499;\" \/><\/p>\n<pre><code class=\"language-bash\"># \u67e5\u770b\u5f53\u524d\u6267\u884c\u7b56\u7565\n# \u663e\u793a Restricted \u5c31\u662f\u7981\u6b62\u811a\u672c\u8fd0\u884c\nGet-Executionpolicy\n\n# \u6539\u4e3a\u5141\u8bb8\u672c\u5730\u672a\u7b7e\u540d\u811a\u672c\u8fd0\u884c\uff08\u8fdc\u7a0b\u9700\u8981\u7b7e\u540d\uff09\nSet-Executionpolicy RemoteSigned<\/code><\/pre>\n<p><img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2023\/08\/image-1691469540240.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 342px; --smush-placeholder-aspect-ratio: 342\/103;\" \/><br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2023\/08\/image-1691469734015.png\" alt=\"\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 430px; --smush-placeholder-aspect-ratio: 430\/85;\" \/><\/p>\n<p>\u4fee\u6539\u6267\u884c\u7b56\u7565\u4e4b\u540e\uff0c\u811a\u672c\u6587\u4ef6\u5c31\u80fd\u76f4\u63a5\u8fd0\u884c\u4e86<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2023\/08\/image-1691469818697.png\" alt=\"\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 319px; --smush-placeholder-aspect-ratio: 319\/143;\" \/><\/p>\n<hr \/>\n<p>\u6240\u6709\u7684\u6267\u884c\u7b56\u7565<\/p>\n<ul>\n<li>Restricted\uff08\u9650\u5236\uff09\uff1a\u8fd9\u662f\u9ed8\u8ba4\u8bbe\u7f6e\uff0c\u4e0d\u5141\u8bb8\u8fd0\u884c\u4efb\u4f55\u811a\u672c\uff0c\u5305\u62ec\u672c\u5730\u811a\u672c\u3002<\/li>\n<li>AllSigned\uff08\u5168\u90e8\u7b7e\u540d\uff09\uff1a\u53ea\u5141\u8bb8\u8fd0\u884c\u7ecf\u8fc7\u6570\u5b57\u7b7e\u540d\u7684\u811a\u672c\u3002\u672c\u5730\u672a\u7b7e\u540d\u7684\u811a\u672c\u5c06\u88ab\u62d2\u7edd\u8fd0\u884c\u3002<\/li>\n<li>RemoteSigned\uff08\u8fdc\u7a0b\u7b7e\u540d\uff09\uff1a\u5141\u8bb8\u8fd0\u884c\u672c\u5730\u521b\u5efa\u7684\u811a\u672c\uff0c\u4f46\u662f\u6765\u81ea\u8fdc\u7a0b\u7684\u811a\u672c\u5fc5\u987b\u7ecf\u8fc7\u6570\u5b57\u7b7e\u540d\u3002\u8fdc\u7a0b\u811a\u672c\u6ca1\u6709\u6570\u5b57\u7b7e\u540d\u4e5f\u4f1a\u88ab\u62d2\u7edd\u8fd0\u884c\u3002<\/li>\n<li>Unrestricted\uff08\u65e0\u9650\u5236\uff09\uff1a\u5141\u8bb8\u8fd0\u884c\u6240\u6709\u811a\u672c\uff0c\u5305\u62ec\u672c\u5730\u548c\u8fdc\u7a0b\u7684\uff0c\u5e76\u4e14\u4e0d\u8981\u6c42\u811a\u672c\u7ecf\u8fc7\u6570\u5b57\u7b7e\u540d\u3002<\/li>\n<li>Bypass\uff08\u7ed5\u8fc7\uff09\uff1a\u5b8c\u5168\u4e0d\u68c0\u67e5\u811a\u672c\u7684\u7b7e\u540d\uff0c\u5141\u8bb8\u6240\u6709\u811a\u672c\u8fd0\u884c\u3002\u8fd9\u4e2a\u8bbe\u7f6e\u53ef\u80fd\u4f1a\u5bf9\u7cfb\u7edf\u5b89\u5168\u6027\u9020\u6210\u98ce\u9669\uff0c\u56e0\u4e3a\u6076\u610f\u811a\u672c\u4e5f\u53ef\u4ee5\u88ab\u8fd0\u884c\u3002<\/li>\n<li>Undefined\uff08\u672a\u5b9a\u4e49\uff09\uff1a\u672a\u5b9a\u4e49\u6267\u884c\u7b56\u7565\u65f6\u7684\u9ed8\u8ba4\u72b6\u6001\uff0c\u901a\u5e38\u7b49\u540c\u4e8e Restricted\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Windows \u4e0a PowerShell \u9ed8\u8ba4\u662f\u7981\u6b62\u6267\u884c\u811a\u672c\u6587\u4ef6\u7684 \u53ef\u4ee5\u4fee\u6539\u6267\u884c\u7b56\u7565\u5141\u8bb8\u811a\u672c\u8fd0\u884c\u3002\u4ee5\u7ba1\u7406\u5458\u6743\u9650 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"zakra_page_container_layout":"customizer","zakra_page_sidebar_layout":"customizer","zakra_remove_content_margin":false,"zakra_sidebar":"customizer","zakra_transparent_header":"customizer","zakra_logo":0,"zakra_main_header_style":"default","zakra_menu_item_color":"","zakra_menu_item_hover_color":"","zakra_menu_item_active_color":"","zakra_menu_active_style":"","zakra_page_header":true,"_lmt_disableupdate":"no","_lmt_disable":"no","footnotes":""},"categories":[1,615],"tags":[],"class_list":["post-10735","post","type-post","status-publish","format-standard","hentry","category-all","category-powershell"],"modified_by":"IYATT-yx","_links":{"self":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/10735","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10735"}],"version-history":[{"count":0,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/10735\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10735"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}