{"id":1862,"date":"2015-01-31T21:56:47","date_gmt":"2015-01-31T13:56:47","guid":{"rendered":"http:\/\/192.168.50.160\/wordpress\/?p=1862"},"modified":"2015-02-02T09:56:57","modified_gmt":"2015-02-02T01:56:57","slug":"powershell-3-0ise-%e5%8f%8a%e9%a1%8f%e8%89%b2%e9%85%8d%e7%bd%ae%e6%8a%8a%e5%91%bd%e4%bb%a4%e6%8f%90%e7%a4%ba%e8%87%aa%e5%ad%97%e6%b7%98%e6%b1%b0%e6%8e%89%e5%90%a7","status":"publish","type":"post","link":"https:\/\/history.dowdot.idv.tw\/?p=1862","title":{"rendered":"[PowerShell 3.0(ISE) \u5b89\u88dd\u53ca\u984f\u8272\u914d\u7f6e]-\u628a\u547d\u4ee4\u63d0\u793a\u5b57\u5143\u6dd8\u6c70\u6389\u5427!!"},"content":{"rendered":"<p>\u5982\u679c\u60a8\u66fe\u7d93\u7528\u904ewindows\u81ea\u5e36\u7684\u300c\u547d\u4ee4\u63d0\u793a\u5b57\u5143\u300d\u7684\u7d93\u9a57\uff0c\u60f3\u5fc5\u6703\u89ba\u5f97\u5f88\u96e3\u7528\u53c8\u4e0d\u65b9\u4fbf\u5427!(\u9023\u7528\u500bcopy\u3001past\u90fd\u53e6\u4eba\u4e0d\u9806\u624b)<\/p>\n<p>\u5176\u5be6\u5e73\u6642\u7528\u5b83\u7684\u6a5f\u6703\u4e26\u4e0d\u9ad8,\u901a\u5e38\u53ea\u62ff\u5b83\u4f86\u505a\u7c21\u55ae\u7684\u7db2\u8def\u9664\u932f\u60f3\u8aaa\u5c31\u5fcd\u8457\u7528\uff0c\u4e0d\u904e\u6700\u8fd1\u5b89\u88dd\u4e86<a href=\"http:\/\/git-scm.com\/\" target=\"_blank\">Git<\/a>,\u5176\u4e2d\u7684Git Shell\u5c31\u662fPowserShell\u3002<\/p>\n<p><img class=\"ngg-singlepic ngg-none\" src=\"http:\/\/192.168.50.160\/wordpress\/wp-content\/gallery\/20150131_powershell\/powershell2.png\" alt=\"powershell2\" \/><\/p>\n<blockquote><p><b>Windows PowerShell<\/b>\u662f<a class=\"mw-redirect\" title=\"\u5fae\u8edf\u516c\u53f8\" href=\"http:\/\/zh.wikipedia.org\/wiki\/%E5%BE%AE%E8%BD%AF%E5%85%AC%E5%8F%B8\">\u5fae\u8edf\u516c\u53f8<\/a>\u70ba<a class=\"mw-redirect\" title=\"Windows\" href=\"http:\/\/zh.wikipedia.org\/wiki\/Windows\">Windows<\/a>\u74b0\u5883\u6240\u958b\u767c\u7684<a class=\"mw-redirect\" title=\"Shell\" href=\"http:\/\/zh.wikipedia.org\/wiki\/Shell\">shell<\/a>\u53ca<a class=\"mw-redirect\" title=\"\u8173\u672c\u8a9e\u8a00\" href=\"http:\/\/zh.wikipedia.org\/wiki\/%E8%85%B3%E6%9C%AC%E8%AA%9E%E8%A8%80\">\u8173\u672c\u8a9e\u8a00<\/a>\u6280\u8853\uff0c\u63a1\u7528\u7684\u662f<a title=\"\u547d\u4ee4\u5217\u4ecb\u9762\" href=\"http:\/\/zh.wikipedia.org\/wiki\/%E5%91%BD%E4%BB%A4%E8%A1%8C%E7%95%8C%E9%9D%A2\">\u547d\u4ee4\u5217\u4ecb\u9762<\/a>\u3002\u8b93Windows \u4f5c\u696d\u7cfb\u7d71\u4e5f\u80fd\u64c1\u6709\u985e\u4f3c UNIX BASH \u7684 Shell \u74b0\u5883<\/p><\/blockquote>\n<p>\u7d50\u679c\u8c46\u5b50\u7528\u7fd2\u6163\u5f8c\u60f3\u8aaa\u5c31\u76f4\u63a5\u53d6\u4ee3\u90a3\u500b\u4e0d\u597d\u7528\u7684\u300c\u547d\u4ee4\u63d0\u793a\u5b57\u5143\u300d\uff0c\u552f\u8b80\u90a3\u500b\u5b57\u578b\u548c\u914d\u8272\uff0c\u53e6\u4eba\u89ba\u5f97\u4e0d\u9806\u773c....<br \/>\n\u4e0a\u7db2\u67e5\u4e86\u4e00\u4e9b\u8cc7\u6599\uff0c\u767c\u73fe\u70ba\u4ec0\u9ebc\u6709\u4e9b\u7db2\u53cb\u7684PowerShell\u548c\u8c46\u5b50\u9577\u7684\u4e0d\u592a\u4e00\u6a23\uff0c\u529f\u80fd\u8c6a\u83ef\u591a\u4e86...<\/p>\n<p>\u539f\u4f86Git Shell\u5b89\u88dd\u7684PowserShell\u662f2.0\u7248\uff0c\u800cPowerShell\u9084\u6709\u53e6\u4e00\u500bPowerShell ISE\u7684\u61c9\u7528\u7a0b\u5f0f\uff0c\u662fISE\u624d\u6709\u8c6a\u83ef\u529f\u80fd\u5537\u3002<\/p>\n<blockquote><p>MicroSoft TechNET: PowerShell \u6574\u5408\u5f0f\u6307\u4ee4\u78bc\u74b0\u5883 (ISE) \u662f Windows PowerShell \u7684\u4e3b\u6a5f\u61c9\u7528\u7a0b\u5f0f\u3002\u5728 Windows PowerShell ISE \u4e2d\uff0c\u60a8\u53ef\u4ee5\u5728\u55ae\u4e00 Windows \u5716\u5f62\u4f7f\u7528\u8005\u4ecb\u9762\u4e2d\uff0c\u5229\u7528\u591a\u884c\u7de8\u8f2f\u3001Tab \u9375\u5b8c\u6210\u529f\u80fd\u3001\u8a9e\u6cd5\u8457\u8272\u3001\u9078\u64c7\u6027\u57f7\u884c\u3001\u5373\u6642\u7dda\u4e0a\u8aaa\u660e\u4ee5\u53ca\u5c0d\u5f9e\u53f3\u81f3\u5de6\u8a9e\u8a00\u7684\u652f\u63f4\uff0c\u57f7\u884c\u547d\u4ee4\uff0c\u64b0\u5beb\u3001\u6e2c\u8a66\u4e26\u9032\u884c\u6307\u4ee4\u78bc\u6e2c\u932f\u3002 \u4f7f\u7528\u529f\u80fd\u8868\u9805\u76ee\u548c\u9375\u76e4\u5feb\u901f\u9375\u53ef\u4ee5\u57f7\u884c\u8a31\u591a\u8207 Windows PowerShell \u4e3b\u63a7\u53f0 \u6240\u57f7\u884c\u7684\u76f8\u540c\u7684\u5de5\u4f5c\u3002\u4f8b\u5982\uff0c\u5728 Windows PowerShell ISE \u4e2d\u5075\u932f\u6307\u4ee4\u78bc\u6642\uff0c\u82e5\u8981\u5728\u6307\u4ee4\u78bc\u4e2d\u8a2d\u5b9a\u884c\u4e2d\u65b7\u9ede\uff0c\u8acb\u4ee5\u6ed1\u9f20\u53f3\u9375\u6309\u4e00\u4e0b\u7a0b\u5f0f\u78bc\u884c\uff0c\u518d\u6309\u4e00\u4e0b [<strong>\u5207\u63db\u4e2d\u65b7\u9ede<\/strong>]\u3002<\/p><\/blockquote>\n<p>\u8c46\u5b50\u7528\u7684\u4f5c\u696d\u7cfb\u7d71\u662fWindows 7\uff0c\u9810\u8a2d\u4e5f\u53ea\u914d\u7f6ePowerShell 2.0\uff0c\u5728\u00a0Windows Server 2012\u3001 Windows Server 2012 R2\u3001Windows 8 \u6216 Windows 8.1\uff0c\u624d\u6703\u9810\u5148\u914d\u7f6e PowerShell 3.0\u3002\u4e0d\u904eWindows 7\u4e5f\u9084\u662f\u80fd\u88dd\u00a0 PowerShell 3.0\u5537...\u76f4\u63a5\u5230\u5b98\u7db2\u76f4\u63a5\u4e0b\u8f09\u00a0<a href=\"http:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=34595\" target=\"_blank\">Windows Management Framework<\/a>\u00a0\u5b89\u88dd\u5c31\u53ef\u4ee5\u4e86!!<\/p>\n<p>\u5728 Windows PowerShell \u4e3b\u63a7\u53f0\u4e2d\uff0c\u8f38\u5165\u4e0b\u5217\u547d\u4ee4\u5c31\u53ef\u4ee5\u89c0\u770bPowerShell\u7684\u7248\u672c\uff1a<\/p>\n<pre class=\"toolbar:1 lang:sh decode:true\" title=\"\u6307\u4ee4\uff1a\u986f\u793aPowerShell\u7248\u672c\">Get-Host | Select-Object Version<\/pre>\n<h3>\u00a0<img class=\"ngg-singlepic ngg-none\" src=\"http:\/\/192.168.50.160\/wordpress\/wp-content\/gallery\/20150131_powershell\/powershell.png\" alt=\"powershell\" \/><\/h3>\n<h3>\u984f\u8272\u914d\u7f6e<\/h3>\n<p>\u5149\u88dd\u597d\uff0c\u984f\u8272\u9084\u662f\u919c\u7684\u3002\u6240\u4ee5\uff0c\u63a5\u4e0b\u4f86\u5c31\u662f\u5e6bPowerShell\u5ba2\u5236\u5316\u4e3b\u984c\u984f\u8272\u4e86\uff0c\u4e0a\u7db2\u627e\u4e86\u4e00\u4e0b\uff0c\u767c\u73fe\u6709\u7db2\u53cb\u5206\u4eabSublime\u98a8\u683c\u7684\u914d\u7f6e\u8173\u672c\u6a94(\u53c3\u8003\u7db2\u7ad91)\uff0c\u56e0\u70ba\u8c46\u5b50\u5e73\u6642\u5c31\u6163\u7528Sublime\uff0c\u9019\u914d\u7f6e\u6a94\u5be6\u5728\u662f\u4ee4\u4eba\u958b\u5fc3\u5566!!<\/p>\n<p>\u4e0b\u8f09\u56de\u4f86\u7684\u6a94\u6848\u89e3\u958b\u5f8c\u4e00\u5171\u6709\u4e8c\u500b\u6a94\uff0c\u5305\u542b\u4e00\u500b\u5b57\u578b\u6a94\u548cPowerShell\u7684\u8173\u672c\u6a94(\u526f\u6a94\u540d\u70baps1),\u5b57\u578b\u6a94\u7684\u90e8\u4efd\u60a8\u53ef\u81ea\u884c\u659f\u914c\u662f\u5426\u8981\u5b89\u88dd\u53ca\u5957\u7528\u3002<\/p>\n<p><img class=\"ngg-singlepic ngg-none\" src=\"http:\/\/192.168.50.160\/wordpress\/wp-content\/gallery\/20150131_powershell\/powershell3.png\" alt=\"powershell3\" \/><\/p>\n<p>\u8173\u672c\u6a94\u662f\u7d14\u6587\u5b57\u6a94\uff0c\u60a8\u53ef\u4ee5\u7528PowerShell\u76f4\u63a5\u6253\u958b\u4e26\u9ede\u9078\u4e0a\u65b9\u7684\u300c\u57f7\u884c\u6307\u4ee4\u78bc(F5)\u300d\u529f\u80fd\u5c31\u53ef\u4ee5\u5957\u7528\u3002<\/p>\n<p><img loading=\"lazy\" class=\"ngg-singlepic ngg-none\" src=\"http:\/\/192.168.50.160\/wordpress\/wp-content\/gallery\/20150131_powershell\/powershell5.png\" alt=\"powershell5\" width=\"745\" height=\"501\" \/><\/p>\n<p>\u53ef\u662f\u7576 PowerShell \u57f7\u884c script \u6a94\u6642\uff0c\u537b\u51fa\u73fe\u4e00\u5806\u932f\u8aa4\uff0c\u4e26\u4e2d\u300c<strong>\u6a94\u6848\u7121\u6cd5\u8f09\u5165\uff0c\u56e0\u70ba\u9019\u500b\u7cfb\u7d71\u5df2\u505c\u7528\u6307\u4ee4\u78bc\u57f7\u884c<\/strong>\u300d\u7684\u8a0a\u606f\uff0c\u9019\u662f\u56e0\u70ba\u4f5c\u696d\u7cfb\u7d71\u76ee\u524d\u7684\u57f7\u884c\u539f\u5247 ( Excution Policy ) \u9810\u8a2d\u72c0\u614b\u70ba Restricted(\u4e0d\u5141\u8a31\u57f7\u884c)\u6240\u9020\u6210\u7684\uff0c\u662f\u70ba\u4e86\u9632\u6b62\u6709\u60e1\u610f\u7684\u8173\u672c\u88ab\u57f7\u884c\u3002<\/p>\n<p>\u60a8\u53ef\u4ee5\u7528\u4e0b\u9762\u7684\u6307\u4ee4\u78ba\u5b9a\u76ee\u524d\u7684\u57f7\u884c\u7b56\u7565\uff1a<\/p>\n<pre class=\"lang:sh decode:true\">Get-ExecutionPolicy<\/pre>\n<p>\u6240\u4ee5\u60a8\u5fc5\u9700\u5c07\u57f7\u884c\u7b56\u7565\u7531Restricted\u6539\u6210Unrestricted\uff0c\u4e0d\u904e\u5728\u66f4\u6539\u524d\u60a8\u5fc5\u9700\u5148\u5c07PowerShell\u95dc\u9589\u518d\u91cd\u65b0\u958b\u555f\uff0c\u4e26\u6307\u5b9a\u7531\u300c\u7cfb\u7d71\u7ba1\u7406\u54e1\u57f7\u884c\u300d\uff0c\u5426\u5247\u662f\u6539\u4e0d\u6210\u529f\u7684\u5537!!<\/p>\n<p><img class=\"ngg-singlepic ngg-none\" src=\"http:\/\/192.168.50.160\/wordpress\/wp-content\/gallery\/20150131_powershell\/powershell6.png\" alt=\"powershell6\" \/><\/p>\n<p>\u63a5\u4e0b\u4f86\u5c31\u662f\u7528\u4ee5\u4e0b\u7684\u6307\u4ee4\u66f4\u6539\u57f7\u884c\u7b56\u7565\uff1a<\/p>\n<pre class=\"lang:sh decode:true\">Set-ExecutionPolicy Unrestricted<\/pre>\n<p style=\"padding-left: 30px;\">\u8a3b:ExecutionPolicy\u53ef\u4ee5\u8a2d\u5b9a\u7684\u7b56\u7565\u6709\uff1a<\/p>\n<p style=\"padding-left: 60px;\">1. Restricted - \u8173\u672c\u4e0d\u80fd\u904b\u884c\u3002<br \/>\n2. RemoteSigned - \u672c\u5730\u5275\u5efa\u7684\u8173\u672c\u53ef\u4ee5\u904b\u884c\uff0c\u4f46\u5f9e\u7db2\u4e0a\u4e0b\u8f09\u7684\u8173\u672c\u4e0d\u80fd\u904b\u884c\uff08\u9664\u975e\u5b83\u5011\u64c1\u6709 \u7531\u53d7\u4fe1\u4efb\u7684\u767c\u4f48\u8005\u7c3d\u7f72\u7684\u6578\u4f4d\u7c3d\u7ae0\uff09\u3002<br \/>\n3. AllSigned \u2013 \u50c5\u7576\u8173\u672c\u7531\u53d7\u4fe1\u4efb\u7684\u767c\u4f48\u8005\u7c3d\u540d\u624d\u80fd\u904b\u884c\u3002<br \/>\n4. Unrestricted \u2013 \u8173\u672c\u57f7\u884c\u4e0d\u53d7\u9650\u5236\uff0c\u4e0d\u7ba1\u4f86\u81ea\u54ea\u88e1\uff0c\u4e5f\u4e0d\u7ba1\u5b83\u5011\u662f\u5426\u6709\u7c3d\u540d\u3002<\/p>\n<p>\u66f4\u6539\u5b8c\u6210\u5f8c\uff0c\u60a8\u6703\u767c\u73fe\u8173\u672c\u5c31\u53ef\u4ee5\u6210\u529f\u57f7\u884c\u4e86\uff0c\u800c\u4e14\u57f7\u884c\u5b8c\u4f48\u666f\u5c31\u8a2d\u7f6e\u5b8c\u6210\u4e86\uff0c\u6709\u4e86\u7f8e\u7f8e\u7684\u984f\u8272\uff0c\u5b57\u578b\u4e5f\u5927\u591a\u4e86!!<\/p>\n<p><img class=\"ngg-singlepic ngg-none\" src=\"http:\/\/192.168.50.160\/wordpress\/wp-content\/gallery\/20150131_powershell\/powershell8.png\" alt=\"powershell8\" \/><\/p>\n<h3>\u00a0\u9032\u968e\u7528\u6cd5\uff1a<\/h3>\n<p>\u5728PowerShell\u88e1\u9664\u4e86\u53ef\u4ee5\u76f4\u63a5\u7528Ctrl+C\u3001Ctrl+V\u4f86\u8907\u5236\u3001\u8cbc\u4e0a\u5916\uff0c\u9084\u53ef\u4ee5\u8a2d\u5b9aAlias\u8b93PowerShell\u4e5f\u53ef\u4ee5\u7528\u548cLinux\u76f8\u540c\u7684\u6307\u4ee4\u5537...<\/p>\n<pre class=\"lang:sh decode:true \">Set-Alias grep Select-String<\/pre>\n<p>&nbsp;<\/p>\n<p>\u53c3\u8003\u7db2\u7ad9:<\/p>\n<ol>\n<li><a href=\"http:\/\/www.cnblogs.com\/piapia\/p\/3987305.html\">powershell ise\u597d\u5b57\u5e93\u548cdiy\u914d\u8272\u6587\u4ef6\u5206\u4eab<\/a><\/li>\n<li><a href=\"https:\/\/technet.microsoft.com\/zh-tw\/library\/dn362783.aspx\" target=\"_blank\">\u5728 Lync Online \u4e2d\u4e0b\u8f09\u4e26\u5b89\u88dd Windows PowerShell 3.0<\/a><\/li>\n<li><a href=\"https:\/\/technet.microsoft.com\/zh-tw\/library\/dd315244.aspx\" target=\"_blank\">Windows PowerShell ISE \u7c21\u4ecb<\/a><\/li>\n<li><a href=\"http:\/\/www.powershellpro.com\/powershell-tutorial-introduction\/tutorial-powershell-aliases\/\" target=\"_blank\">PowerShell Tutorial 3: PowerShell Aliases<\/a><\/li>\n<li><a href=\"http:\/\/os.51cto.com\/art\/201101\/244228.htm\" target=\"_blank\">\u6709\u5173PowerShell\u811a\u672c\u4f60\u5fc5\u987b\u77e5\u9053\u7684\u5341\u4e2a\u57fa\u672c\u6982\u5ff5<\/a><\/li>\n<li><a href=\"http:\/\/www.fisc.com.tw\/Upload\/b4432f75-500b-4749-913b-e9519e593725\/TC\/10.%20%E5%BD%AD%E8%80%80%E6%9D%B1%E3%80%81%E9%99%B3%E7%BE%8E%E6%83%A0.pdf\" target=\"_blank\">\u6dfa\u8ac7Windows PowerShell \u7ba1\u7406\u6280\u8853<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u60a8\u66fe\u7d93\u7528\u904ewindows\u81ea\u5e36\u7684\u300c\u547d\u4ee4\u63d0\u793a\u5b57\u5143\u300d\u7684\u7d93\u9a57\uff0c\u60f3\u5fc5\u6703\u89ba\u5f97\u5f88\u96e3\u7528\u53c8\u4e0d\u65b9\u4fbf\u5427!(\u9023\u7528\u500bcopy\u3001past\u90fd\u53e6\u4eba\u4e0d\u9806\u624b) \u5176\u5be6\u5e73\u6642\u7528\u5b83\u7684\u6a5f\u6703\u4e26\u4e0d\u9ad8,\u901a\u5e38\u53ea\u62ff\u5b83\u4f86\u505a\u7c21\u55ae\u7684\u7db2\u8def\u9664\u932f\u60f3\u8aaa\u5c31\u5fcd\u8457\u7528\uff0c\u4e0d\u904e\u6700\u8fd1\u5b89\u88dd\u4e86Git,\u5176\u4e2d\u7684Git Shell\u5c31\u662fPowserShell\u3002 Windows PowerS&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":1898,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"ngg_post_thumbnail":0,"spay_email":""},"categories":[14,10],"tags":[],"jetpack_featured_media_url":"https:\/\/history.dowdot.idv.tw\/wp-content\/uploads\/2015\/01\/powershell8.png","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5NCTI-u2","_links":{"self":[{"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/1862"}],"collection":[{"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1862"}],"version-history":[{"count":24,"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/1862\/revisions"}],"predecessor-version":[{"id":1909,"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/1862\/revisions\/1909"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=\/wp\/v2\/media\/1898"}],"wp:attachment":[{"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}