{"id":80,"date":"2013-08-17T21:28:41","date_gmt":"2013-08-18T01:28:41","guid":{"rendered":"http:\/\/batchpatch.com\/?p=80"},"modified":"2022-10-07T11:48:38","modified_gmt":"2022-10-07T15:48:38","slug":"using-batchpatch-with-windows-firewall","status":"publish","type":"post","link":"https:\/\/batchpatch.com\/using-batchpatch-with-windows-firewall","title":{"rendered":"Using BatchPatch with Windows Firewall"},"content":{"rendered":"<p>BatchPatch uses a combination of Windows Management Instrumentation (WMI) and PsExec to access remote computers, plus ICMP for pinging.\u00a0 If you need to use BatchPatch in an environment where your remote computers have Windows Firewall enabled, here&#8217;s what you need to do to make everything work.  (For specific information about port requirements, please see <a href=\"\/batchpatch-ports\" title=\"BatchPatch Port Requirements\" target=\"_blank\" rel=\"noopener\">BatchPatch Port Requirements<\/a>)<\/p>\n<p>In general, if you&#8217;re using Windows firewall and you encounter any issues that you need to troubleshoot, it is a good idea to enable logging so that you can troubleshoot any potential issues.  This link explains how to do that: <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/cc947815%28v=ws.10%29.aspx\" title=\"Enable logging for Windows firewall\" target=\"_blank\" rel=\"noopener\">Enable logging for Windows firewall<\/a><\/p>\n<p>Note, if desired you can apply a <em>scope<\/em> or <em>IP address range<\/em> to the rules you create below so that the rules only allow inbound connections from a computer with a particular IP address.  This enables you to run BatchPatch from a particular computer so that only that BatchPatch computer&#8217;s IP address can utilize the firewall rules you create.  After you create the firewall rules described in the tutorial below, optionally use <a href=\"\/modifying-the-scope-of-windows-firewall-rules-to-allow-connections-only-from-selected-ip-addresses\" title=\"Modifying the Scope of Windows Firewall Rules to Allow Connections Only From Selected IP Addresses\">this tutorial<\/a> to apply an IP address range to the <em>scope<\/em> for each firewall rule you create.<\/p>\n<h2 class=\"brownishOrange\">Using Group Policy to Configure the Windows Firewall:<\/h2>\n<p><strong>It is sufficient to use Group Policy to allow &#8220;Remote Administration&#8221; and &#8220;File and Printer Sharing&#8221; on the remote computers.  See screenshot:<\/strong><\/p>\n<p><a href=\"http:\/\/batchpatch.com\/wp-content\/uploads\/2011\/08\/BatchPatch-and-Windows-Firewall-GPO.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-81\" title=\"BatchPatch and Windows Firewall GPO\" src=\"http:\/\/batchpatch.com\/wp-content\/uploads\/2011\/08\/BatchPatch-and-Windows-Firewall-GPO-300x213.png\" alt=\"\" width=\"300\" height=\"213\" srcset=\"https:\/\/batchpatch.com\/wp-content\/uploads\/2011\/08\/BatchPatch-and-Windows-Firewall-GPO-300x213.png 300w, https:\/\/batchpatch.com\/wp-content\/uploads\/2011\/08\/BatchPatch-and-Windows-Firewall-GPO.png 801w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2 class=\"brownishOrange\">Configuring the Windows Firewall Directly on Target Computers:<\/h2>\n<p>If Group Policy is not an option and you instead need to manually adjust the remote computer settings, here&#8217;s how:<\/p>\n<p><strong>When the remote system is Windows 7\/2008R2, Windows 2012\/2012R2, Windows 10\/2016<\/strong>:<\/p>\n<p>Go to Control Panel &gt; Windows Firewall &gt; Allow an app or feature, and then check the boxes for <em><strong>&#8220;File and Printer Sharing&#8221;<\/strong><\/em> and <em><strong>&#8220;Windows Management Instrumentation (WMI)&#8221;<\/strong><\/em> and then click <em><strong>&#8220;OK.&#8221;<\/strong><\/em><\/p>\n<p><a href=\"https:\/\/batchpatch.com\/wp-content\/uploads\/2013\/08\/Win2012_FirewallConfig.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/batchpatch.com\/wp-content\/uploads\/2013\/08\/Win2012_FirewallConfig.png\" alt=\"Win2012_FirewallConfig\" width=\"796\" height=\"631\" class=\"aligncenter size-full wp-image-1763\" srcset=\"https:\/\/batchpatch.com\/wp-content\/uploads\/2013\/08\/Win2012_FirewallConfig.png 796w, https:\/\/batchpatch.com\/wp-content\/uploads\/2013\/08\/Win2012_FirewallConfig-300x237.png 300w\" sizes=\"auto, (max-width: 796px) 100vw, 796px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>When the remote system is Windows 2012 Core (no GUI) or Windows 2016 Core (no GUI)<\/strong>:<\/p>\n<p>At a PowerShell prompt use the following two commands:<\/p>\n\n<div class=\"wp_syntax\"><table><tr><td class=\"code\"><pre class=\"powershell\" style=\"font-family:monospace;\">enable<span style=\"color: pink;\">-<\/span>netfirewallrule <span style=\"color: pink;\">-<\/span>displaygroup <span style=\"color: #800000;\">&quot;file and printer sharing&quot;<\/span>\nenable<span style=\"color: pink;\">-<\/span>netfirewallrule <span style=\"color: pink;\">-<\/span>displaygroup <span style=\"color: #800000;\">&quot;windows management instrumentation (wmi)&quot;<\/span><\/pre><\/td><\/tr><\/table><\/div>\n\n<p><a href=\"\/wp-content\/uploads\/2013\/08\/FirewallSettingsServerCore.png\" rel=\"attachment wp-att-2925\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2013\/08\/FirewallSettingsServerCore.png\" alt=\"FirewallSettingsServerCore\" width=\"897\" height=\"409\" class=\"aligncenter size-full wp-image-2925\" srcset=\"https:\/\/batchpatch.com\/wp-content\/uploads\/2013\/08\/FirewallSettingsServerCore.png 897w, https:\/\/batchpatch.com\/wp-content\/uploads\/2013\/08\/FirewallSettingsServerCore-300x137.png 300w, https:\/\/batchpatch.com\/wp-content\/uploads\/2013\/08\/FirewallSettingsServerCore-768x350.png 768w\" sizes=\"auto, (max-width: 897px) 100vw, 897px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>When the remote system is Windows 2008 (non-R2)<\/strong>:<\/p>\n<p>Go to Control Panel &gt; Windows Firewall &gt; Change Settings &gt;Exceptions &gt; check the box for <em><strong>&#8220;File and Printer Sharing&#8221;<\/strong><\/em> and <em><strong>&#8220;Remote Administration&#8221;<\/strong><\/em> and then click <em><strong>&#8220;Apply&#8221;<\/strong><\/em> or <em><strong>&#8220;OK.&#8221;<\/strong><\/em><\/p>\n<p><a href=\"http:\/\/batchpatch.com\/wp-content\/uploads\/2011\/08\/BatchPatchAndWindowsFirewall2008.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-82\" title=\"BatchPatchAndWindowsFirewall2008\" src=\"http:\/\/batchpatch.com\/wp-content\/uploads\/2011\/08\/BatchPatchAndWindowsFirewall2008-256x300.png\" alt=\"\" width=\"256\" height=\"300\" srcset=\"https:\/\/batchpatch.com\/wp-content\/uploads\/2011\/08\/BatchPatchAndWindowsFirewall2008-256x300.png 256w, https:\/\/batchpatch.com\/wp-content\/uploads\/2011\/08\/BatchPatchAndWindowsFirewall2008.png 433w\" sizes=\"auto, (max-width: 256px) 100vw, 256px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>When the remote system is Windows 2003<\/strong>:<\/p>\n<p>1. Go to Control Panel &gt; Windows Firewall &gt;Exceptions &gt; check the box for <em><strong>&#8220;File and Printer Sharing&#8221;<\/strong><\/em> and then click <em><strong>&#8220;OK.&#8221;<\/strong><\/em><\/p>\n<p><a href=\"http:\/\/batchpatch.com\/wp-content\/uploads\/2011\/08\/BatchPatchAndWindowsFirewall2003.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-83\" title=\"BatchPatchAndWindowsFirewall2003\" src=\"http:\/\/batchpatch.com\/wp-content\/uploads\/2011\/08\/BatchPatchAndWindowsFirewall2003-255x300.png\" alt=\"\" width=\"255\" height=\"300\" srcset=\"https:\/\/batchpatch.com\/wp-content\/uploads\/2011\/08\/BatchPatchAndWindowsFirewall2003-255x300.png 255w, https:\/\/batchpatch.com\/wp-content\/uploads\/2011\/08\/BatchPatchAndWindowsFirewall2003.png 432w\" sizes=\"auto, (max-width: 255px) 100vw, 255px\" \/><\/a><\/p>\n<p>2. Open a command prompt and type:<\/p>\n\n<div class=\"wp_syntax\"><table><tr><td class=\"code\"><pre class=\"dos\" style=\"font-family:monospace;\">netsh firewall <span style=\"color: #b1b100; font-weight: bold;\">set<\/span> service type = remoteadmin mode =  enable<\/pre><\/td><\/tr><\/table><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>BatchPatch uses a combination of Windows Management Instrumentation (WMI) and PsExec to access remote computers, plus ICMP for pinging.\u00a0 If you need to use BatchPatch in an environment where your remote computers have Windows Firewall enabled, here&#8217;s what you need to do to make everything work. (For specific information about port requirements, please see BatchPatch [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1,17,3],"tags":[6,7,8],"class_list":["post-80","post","type-post","status-publish","format-standard","hentry","category-blog","category-general","category-tutorials","tag-batchpatch","tag-firewall","tag-ports"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/posts\/80","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/comments?post=80"}],"version-history":[{"count":11,"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/posts\/80\/revisions"}],"predecessor-version":[{"id":6005,"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/posts\/80\/revisions\/6005"}],"wp:attachment":[{"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/media?parent=80"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/categories?post=80"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/tags?post=80"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}