{"id":583,"date":"2016-01-07T11:59:03","date_gmt":"2016-01-07T09:59:03","guid":{"rendered":"http:\/\/ersinakyuz.com\/blog\/?p=583"},"modified":"2016-11-28T14:59:57","modified_gmt":"2016-11-28T12:59:57","slug":"how-to-troubleshoot-memory-issues-when-executing-remote-powershell-queries","status":"publish","type":"post","link":"https:\/\/www.ersinakyuz.com\/?p=583","title":{"rendered":"How to troubleshoot memory issues when executing remote Powershell queries"},"content":{"rendered":"<p>If you are receiving &#8220;Processing data for a remote command failed with the following error message: The WSMan provider&#8221; message from the PS Queries (e.g.\u00a0on the Nagios)<\/p>\n<p>All you have to do is log on the target computer, and run powershell with Administrator Rights. Then you can increase Powershell memory with below commands<\/p>\n<p>You can get current memory size with get-item:<\/p>\n<pre class=\"\">Get-Item WSMan:\\localhost\\Shell\\MaxMemoryPerShellMB<\/pre>\n<p>&nbsp;<\/p>\n<p>And\u00a0here is the command for change the value:<\/p>\n<pre class=\"\">Set-Item WSMan:\\localhost\\Shell\\MaxMemoryPerShellMB 250 -Force<\/pre>\n<p>or<\/p>\n<p>winrm set winrm\/config\/winrs @{MaxMemoryPerShellMB=&#8221;512&#8243;}<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-584\" src=\"https:\/\/www.ersinakyuz.com\/blog\/wp-content\/uploads\/2016\/01\/powershellmemory.png\" alt=\"powershellmemory\" width=\"987\" height=\"356\" srcset=\"https:\/\/www.ersinakyuz.com\/wp-content\/uploads\/2016\/01\/powershellmemory.png 987w, https:\/\/www.ersinakyuz.com\/wp-content\/uploads\/2016\/01\/powershellmemory-300x108.png 300w, https:\/\/www.ersinakyuz.com\/wp-content\/uploads\/2016\/01\/powershellmemory-768x277.png 768w\" sizes=\"auto, (max-width: 987px) 100vw, 987px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>In some cases, you need to restart the WinRM service on target system:<\/p>\n<pre class=\"\">Restart-Service winrm\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If you are receiving &#8220;Processing data for a remote command failed with the following error message: The WSMan provider&#8221; message from the PS Queries (e.g.\u00a0on the Nagios) All you have to do is log on the target computer, and run powershell with Administrator Rights. Then you can increase Powershell memory with below commands You can &#8230; <a title=\"How to troubleshoot memory issues when executing remote Powershell queries\" class=\"read-more\" href=\"https:\/\/www.ersinakyuz.com\/?p=583\" aria-label=\"Read more about How to troubleshoot memory issues when executing remote Powershell queries\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,7],"tags":[],"class_list":["post-583","post","type-post","status-publish","format-standard","hentry","category-powershell","category-programming"],"_links":{"self":[{"href":"https:\/\/www.ersinakyuz.com\/index.php?rest_route=\/wp\/v2\/posts\/583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ersinakyuz.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ersinakyuz.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ersinakyuz.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ersinakyuz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=583"}],"version-history":[{"count":7,"href":"https:\/\/www.ersinakyuz.com\/index.php?rest_route=\/wp\/v2\/posts\/583\/revisions"}],"predecessor-version":[{"id":662,"href":"https:\/\/www.ersinakyuz.com\/index.php?rest_route=\/wp\/v2\/posts\/583\/revisions\/662"}],"wp:attachment":[{"href":"https:\/\/www.ersinakyuz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ersinakyuz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ersinakyuz.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}