{"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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"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}]}}