{"id":3439,"date":"2020-01-13T09:33:05","date_gmt":"2020-01-13T00:33:05","guid":{"rendered":"https:\/\/www.xenos.jp\/~zen\/blog2\/?p=3439"},"modified":"2020-01-13T09:33:07","modified_gmt":"2020-01-13T00:33:07","slug":"post-3439","status":"publish","type":"post","link":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/2020\/01\/13\/post-3439\/","title":{"rendered":"Windows10 \u306ePowershell\u306e\u6700\u5927\u30e1\u30e2\u30ea\u30b5\u30a4\u30ba\u306e\u5909\u66f4"},"content":{"rendered":"\n<p>Windows\u00a010\uff08\u304a\u3088\u3073Windows\u00a0Server\u00a02012,\u00a02012\u00a0R2,\u00a02016,\u00a02019\u3082\u540c\u3058\uff09\u3067\u306ePowershell\u306e\u5b9f\u884c\u6642\u306e\u6700\u5927\u30e1\u30e2\u30ea\u6570\u306e\u5909\u66f4\u624b\u9806\u3002Powershell\u3092\u5b9f\u884c\u3057\u305f\u3068\u304d\u306b\u3001\u30e1\u30e2\u30ea\u3092\u4f7f\u3044\u3059\u304e\u305f\u306e\u3067\u3001\u5236\u9650\u3059\u308b\u3002<\/p>\n\n\n\n<p>\u5909\u66f4\u624b\u9806<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Powershell\u3092\u7ba1\u7406\u8005\u30e2\u30fc\u30c9\u3067\u8d77\u52d5\u3059\u308b<\/li><li>Powershell\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d\u3059\u308b<br><em><strong>$PSversionTable<\/strong><\/em><br>\u203bPowershell\u304c3.0\u4ee5\u964d\u306e\u5834\u5408\u306f\u3001\u8ffd\u52a0\u624b\u9806\u3042\u308a\u3002<\/li><li>Powershell\u306e\u30e1\u30e2\u30ea\u5272\u308a\u5f53\u3066\u30b5\u30a4\u30ba\u306e\u78ba\u8a8d<br><strong><em>Get-Item\u00a0WSMan:\\localhost\\Shell\\MaxMemoryPerShellMB<\/em><\/strong><\/li><li>\u8a2d\u5b9a\u5909\u66f4<br><strong><em>Set-Item\u00a0WSMan:\\localhost\\Shell\\MaxMemoryPerShellMB\u00a02048<\/em><\/strong><\/li><li>\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u78ba\u8a8d\uff08Ver3.0\u4ee5\u964d\u306e\u5834\u5408\u306f\u5b9f\u884c\uff09<br><em><strong>ls\u00a0WSMan:localhost\\Plugin\u00a0<\/strong><\/em><\/li><li>\u30d7\u30e9\u30b0\u30a4\u30f3\u306ePowershell\u306e\u5272\u308a\u5f53\u3066\u30b5\u30a4\u30ba\u306e\u78ba\u8a8d\uff08Ver3.0\u4ee5\u964d\u306e\u5834\u5408\u306f\u5b9f\u884c\uff09<br><strong><em>Get-Item\u00a0WSMan:localhost\\Plugin\\microsoft.powershell\\Quotas\\MaxConcurrentCommandsPerShell\u00a0<\/em><\/strong><\/li><li>\u30d7\u30e9\u30b0\u30a4\u30f3\u306ePowershell\u306e\u5272\u308a\u5f53\u3066\u30b5\u30a4\u30ba\u306e\u5909\u66f4\uff08Ver3.0\u4ee5\u964d\u306e\u5834\u5408\u306f\u5b9f\u884c\uff09<br><strong><em>Set-Item\u00a0WSMan:localhost\\Plugin\\microsoft.powershell\\Quotas\\MaxConcurrentCommandsPerShell\u00a02048<\/em><\/strong><\/li><li>\u8a2d\u5b9a\u5909\u66f4\u5f8cWinRM\u306e\u518d\u8d77\u52d5<br><em><strong>Restart-Service\u00a0WinRM<\/strong><\/em><\/li><li>\u4e8b\u5f8c\u78ba\u8a8d<br><strong><em>Get-Item\u00a0WSMan:\\localhost\\Shell\\MaxMemoryPerShellMB<\/em><\/strong><\/li><li>32bit\u306ePowershell\u3092\u7ba1\u7406\u8005\u30e2\u30fc\u30c9\u3067\u8d77\u52d5\u3059\u308b<\/li><li>Powershell\u306e\u30e1\u30e2\u30ea\u5272\u308a\u5f53\u3066\u30b5\u30a4\u30ba\u306e\u78ba\u8a8d<br><strong><em>Get-Item\u00a0WSMan:\\localhost\\Shell\\MaxMemoryPerShellMB\u00a0<\/em><\/strong><br>\u203b\u3082\u3057\u300132bit\u306ePowershell\u306e\u30e1\u30e2\u30ea\u304c\u5909\u308f\u3063\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001\u540c\u3058\u3088\u3046\u306b\u5909\u66f4\u3059\u308b\u3002<\/li><\/ol>\n\n\n\n<p>\u4f5c\u696d\u30ed\u30b0\u3002<\/p>\n\n\n\n<pre>\nPS C:\\WINDOWS\\system32> Get-Item WSMan:\\localhost\\Shell\\MaxMemoryPerShellMB\n\n\n   WSManConfig: Microsoft.WSMan.Management\\WSMan::localhost\\Shell\n\nType            Name                           SourceOfValue   Value\n----            ----                           -------------   -----\nSystem.String   MaxMemoryPerShellMB                            2048\n\n\nPS C:\\WINDOWS\\system32> Set-Item WSMan:\\localhost\\Shell\\MaxMemoryPerShellMB 2048\n\u8b66\u544a: \u66f4\u65b0\u3055\u308c\u305f\u69cb\u6210\u306f\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u3042\u305f\u308a\u306e\u30af\u30a9\u30fc\u30bf\u306e\u5024\u304c 2048\n\u3092\u8d85\u3048\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u64cd\u4f5c\u306b\u5f71\u97ff\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u69cb\u6210\u3092\u78ba\u8a8d\u3057\u3001\u5f71\u97ff\u3092\u53d7\u3051\u308b\u30d7\u30e9\u30b0\n\u30a4\u30f3\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3042\u305f\u308a\u306e\u30af\u30a9\u30fc\u30bf\u306e\u5024\u3092\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\nPS C:\\WINDOWS\\system32>\nPS C:\\WINDOWS\\system32>\nPS C:\\WINDOWS\\system32>\nPS C:\\WINDOWS\\system32>\nPS C:\\WINDOWS\\system32>\nPS C:\\WINDOWS\\system32> ls WSMan:localhost\\Plugin\n\n\n   WSManConfig: Microsoft.WSMan.Management\\WSMan::localhost\\Plugin\n\nType            Keys                                Name\n----            ----                                ----\nContainer       {Name=Event Forwarding Plugin}      Event Forwarding Plugin\nContainer       {Name=microsoft.powershell}         microsoft.powershell\nContainer       {Name=microsoft.powershell.workf... microsoft.powershell.workflow\nContainer       {Name=microsoft.powershell32}       microsoft.powershell32\nContainer       {Name=WMI Provider}                 WMI Provider\n\n\nPS C:\\WINDOWS\\system32> Get-Item WSMan:localhost\\Plugin\\microsoft.powershell\\Quotas\\MaxConcurrentCommandsPerShell\n\n\n   WSManConfig: Microsoft.WSMan.Management\\WSMan::localhost\\Plugin\\microsoft.powershell\\Quotas\n\nType            Name                           SourceOfValue   Value\n----            ----                           -------------   -----\nSystem.String   MaxConcurrentCommandsPerShell                  2147483647\n\n\nPS C:\\WINDOWS\\system32> Set-Item WSMan:localhost\\Plugin\\microsoft.powershell\\Quotas\\MaxConcurrentCommandsPerShell 2048\n\u8b66\u544a: \u69cb\u6210\u306e\u5909\u66f4\u306f\u3001WinRM \u30b5\u30fc\u30d3\u30b9\u3092\u518d\u8d77\u52d5\u3057\u306a\u3044\u3068\u6709\u52b9\u306b\u306a\u308a\u307e\u305b\u3093\u3002WinRM\n\u30b5\u30fc\u30d3\u30b9\u3092\u518d\u8d77\u52d5\u3059\u308b\u306b\u306f\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059: 'Restart-Service winrm'\nPS C:\\WINDOWS\\system32>\nPS C:\\WINDOWS\\system32>\nPS C:\\WINDOWS\\system32> Restart-Service winrm\nPS C:\\WINDOWS\\system32>\n<\/pre>\n\n\n\n<p>\u53c2\u8003<br><a href=\"https:\/\/tech.guitarrapc.com\/entry\/2013\/08\/02\/000842\">https:\/\/tech.guitarrapc.com\/entry\/2013\/08\/02\/000842<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows\u00a010\uff08\u304a\u3088\u3073Windows\u00a0Server\u00a02012,\u00a02012\u00a0R2,\u00a02016,\u00a02019\u3082\u540c\u3058\uff09\u3067\u306ePowershell\u306e\u5b9f\u884c\u6642\u306e\u6700\u5927\u30e1\u30e2\u30ea\u6570\u306e\u5909\u66f4\u624b\u9806\u3002Powershell\u3092\u5b9f\u884c\u3057\u305f\u3068\u304d\u306b\u3001\u30e1\u30e2\u30ea\u3092 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[13,26,29,174],"class_list":["post-3439","post","type-post","status-publish","format-standard","hentry","category-windows","tag-powershell","tag-windows10","tag-windowsserver2012","tag-windowsserver2019"],"_links":{"self":[{"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/posts\/3439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/comments?post=3439"}],"version-history":[{"count":2,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/posts\/3439\/revisions"}],"predecessor-version":[{"id":3489,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/posts\/3439\/revisions\/3489"}],"wp:attachment":[{"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/media?parent=3439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/categories?post=3439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/tags?post=3439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}