<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WinRM | KC's Blog</title>
	<atom:link href="https://www.kjctech.net/tag/winrm/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.kjctech.net</link>
	<description></description>
	<lastBuildDate>Tue, 24 Jan 2023 18:20:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://i0.wp.com/www.kjctech.net/wp-content/uploads/2016/12/cropped-KC-Logo.png?fit=32%2C32&#038;ssl=1</url>
	<title>WinRM | KC's Blog</title>
	<link>https://www.kjctech.net</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">24634607</site>	<item>
		<title>How To Enable WinRM with Domain Group Policy for PowerShell Remoting</title>
		<link>https://www.kjctech.net/how-to-enable-winrm-with-domain-group-policy-for-powershell-remoting/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-enable-winrm-with-domain-group-policy-for-powershell-remoting</link>
					<comments>https://www.kjctech.net/how-to-enable-winrm-with-domain-group-policy-for-powershell-remoting/#comments</comments>
		
		<dc:creator><![CDATA[Kent Chen]]></dc:creator>
		<pubDate>Fri, 19 Jan 2018 06:57:08 +0000</pubDate>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[group policy]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[WinRM]]></category>
		<guid isPermaLink="false">https://www.kjctech.net/?p=3729</guid>

					<description><![CDATA[<p>PowerShell Remoting really makes my work a lot easier but it requires quite a bit of work to get all the remote computers ready to take the remoting calls, such as automatically start Windows Remote Management services, set up the HTTP listener for incoming WinRM requests, as well as open Firewall Port to allow the traffic to go through. For [&#8230;]</p>
The post <a href="https://www.kjctech.net/how-to-enable-winrm-with-domain-group-policy-for-powershell-remoting/">How To Enable WinRM with Domain Group Policy for PowerShell Remoting</a> first appeared on <a href="https://www.kjctech.net">KC's Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>PowerShell Remoting really makes my work a lot easier but it requires quite a bit of work to get all the remote computers ready to take the remoting calls, such as automatically start Windows Remote Management services, set up the HTTP listener for incoming WinRM requests, as well as open Firewall Port to allow the traffic to go through.</p>
<h2>For individual computers</h2>
<p>It&#8217;s quite easy. Just open a PowerShell as Administrator window on the computer and run the following cmdlet and it will take care of the rest.</p>
<pre class="">Enable-PSRemoting</pre>
<p><a href="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/PowerShell-Enable-PSRemoting.png?ssl=1" data-rel="lightbox-image-0" data-rl_title="" data-rl_caption="" title=""><img data-recalc-dims="1" fetchpriority="high" decoding="async" class="alignnone size-full wp-image-3731" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/PowerShell-Enable-PSRemoting.png?resize=438%2C184&#038;ssl=1" alt="PowerShell - Enable PSRemoting" width="438" height="184" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/PowerShell-Enable-PSRemoting.png?w=438&amp;ssl=1 438w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/PowerShell-Enable-PSRemoting.png?resize=250%2C105&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/PowerShell-Enable-PSRemoting.png?resize=360%2C151&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/PowerShell-Enable-PSRemoting.png?resize=100%2C42&amp;ssl=1 100w" sizes="(max-width: 438px) 100vw, 438px" /></a></p>
<h2>For large network</h2>
<p>Deploying the settings via Group Policy is definitely the way to go. If you are on Windows Server 2012 R2, open <strong>Group Policy Management</strong> and find the <strong>Grou Policy object</strong> you want to tweak and edit from there. Or create a new one if needed.</p>
<p>Once you are in there, there are <strong>three places</strong> that you need to go through:</p>
<h3>1. Allow remote server management through WinRM</h3>
<p>Go to <strong>Computer Configuration &gt; Policies &gt; Administrative Templates &gt; Windows Remote Management (WinRM) &gt; WinRM Service</strong>.</p>
<p>Double-click the setting &#8220;<strong>Allow remote server management through WinRM</strong>&#8221;</p>
<p><a href="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through.png?ssl=1" data-rel="lightbox-image-1" data-rl_title="" data-rl_caption="" title=""><img data-recalc-dims="1" decoding="async" class="alignnone size-large wp-image-3732" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through.png?resize=600%2C267&#038;ssl=1" alt="Group Policy - Allow remote server management through" width="600" height="267" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through.png?resize=600%2C267&amp;ssl=1 600w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through.png?resize=250%2C111&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through.png?resize=450%2C200&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through.png?resize=768%2C341&amp;ssl=1 768w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through.png?resize=700%2C311&amp;ssl=1 700w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through.png?resize=520%2C231&amp;ssl=1 520w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through.png?resize=360%2C160&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through.png?resize=100%2C44&amp;ssl=1 100w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through.png?w=801&amp;ssl=1 801w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
<p>Select <strong>Enable</strong> and type in &#8220;*&#8221; in for both <strong>IPv4 filter</strong> and <strong>IPv6 filter</strong>.</p>
<p><a href="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through-dialog.png?ssl=1" data-rel="lightbox-image-2" data-rl_title="" data-rl_caption="" title=""><img data-recalc-dims="1" decoding="async" class="alignnone size-large wp-image-3733" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through-dialog.png?resize=600%2C335&#038;ssl=1" alt="Group Policy - Allow remote server management through dialog" width="600" height="335" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through-dialog.png?resize=600%2C335&amp;ssl=1 600w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through-dialog.png?resize=250%2C140&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through-dialog.png?resize=450%2C251&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through-dialog.png?w=700&amp;ssl=1 700w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through-dialog.png?resize=520%2C290&amp;ssl=1 520w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through-dialog.png?resize=360%2C201&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Allow-remote-server-management-through-dialog.png?resize=100%2C56&amp;ssl=1 100w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
<p>Click OK to close the window.</p>
<p>* If you don&#8217;t see Windows Remote Management in your Group Policy Editor, there is probably the WinRM admin template missing in your Active Directory.</p>
<h3>2. Enable WinRM service</h3>
<p>Go to <strong>Computer Configuration &gt; Policies &gt; Preferences &gt; Control Panel Settings</strong>.</p>
<p>And right-click <strong>Services</strong> and choose <strong>New &gt; Service</strong>.</p>
<p><a href="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-service.png?ssl=1" data-rel="lightbox-image-3" data-rl_title="" data-rl_caption="" title=""><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-3734" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-service.png?resize=484%2C481&#038;ssl=1" alt="Group Policy - New service" width="484" height="481" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-service.png?w=484&amp;ssl=1 484w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-service.png?resize=250%2C248&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-service.png?resize=450%2C447&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-service.png?resize=360%2C358&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-service.png?resize=100%2C99&amp;ssl=1 100w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-service.png?resize=150%2C150&amp;ssl=1 150w" sizes="auto, (max-width: 484px) 100vw, 484px" /></a></p>
<p>Choose <strong>Automatic (Delayed Start)</strong> as startup type, pick <strong>WinRM</strong> as the service name, set <strong>Start service</strong> as the action.</p>
<p><a href="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Service-WinRM.png?ssl=1" data-rel="lightbox-image-4" data-rl_title="" data-rl_caption="" title=""><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-3735" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Service-WinRM.png?resize=414%2C462&#038;ssl=1" alt="Group Policy - New Service WinRM" width="414" height="462" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Service-WinRM.png?w=414&amp;ssl=1 414w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Service-WinRM.png?resize=250%2C279&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Service-WinRM.png?resize=360%2C402&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Service-WinRM.png?resize=100%2C112&amp;ssl=1 100w" sizes="auto, (max-width: 414px) 100vw, 414px" /></a></p>
<p>Click OK to save the change.</p>
<h3>3. Set up the Firewall rule</h3>
<p>Go to <strong>Computer Configuration &gt; Policies &gt; Security Settings &gt; Windows Firewall with Advanced Security.</strong></p>
<p>And right-click <strong>Inbound Rules</strong> and start a <strong>New Rule&#8230;</strong></p>
<p><a href="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule.png?ssl=1" data-rel="lightbox-image-5" data-rl_title="" data-rl_caption="" title=""><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-3737" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule.png?resize=535%2C503&#038;ssl=1" alt="Group Policy - New Inbound Rule" width="535" height="503" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule.png?w=535&amp;ssl=1 535w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule.png?resize=250%2C235&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule.png?resize=450%2C423&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule.png?resize=520%2C489&amp;ssl=1 520w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule.png?resize=360%2C338&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule.png?resize=100%2C94&amp;ssl=1 100w" sizes="auto, (max-width: 535px) 100vw, 535px" /></a></p>
<p>Select <strong>Predefined:</strong> option and choose <strong>Windows Remote Management</strong> from the list (not the one with compatible). Click Next.</p>
<p><a href="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule-wizard-1.png?ssl=1" data-rel="lightbox-image-6" data-rl_title="" data-rl_caption="" title=""><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-large wp-image-3738" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule-wizard-1.png?resize=600%2C485&#038;ssl=1" alt="Group Policy - New Inbound Rule wizard 1" width="600" height="485" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule-wizard-1.png?resize=600%2C485&amp;ssl=1 600w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule-wizard-1.png?resize=250%2C202&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule-wizard-1.png?resize=450%2C363&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule-wizard-1.png?resize=700%2C565&amp;ssl=1 700w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule-wizard-1.png?resize=520%2C420&amp;ssl=1 520w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule-wizard-1.png?resize=360%2C291&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule-wizard-1.png?resize=100%2C81&amp;ssl=1 100w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-New-Inbound-Rule-wizard-1.png?w=728&amp;ssl=1 728w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a></p>
<p>Select the one for <strong>Domain and Private</strong>, and <strong>Allow the connection</strong> option at the next screen. And click Finish.</p>
<p>To reduce the exposure to this service we can remove the <strong>Private</strong> and only leave only <strong>Domain</strong> profile in place. Double-click the new rule we just created, go to <strong>Advanced</strong> tab and uncheck the <strong>Private</strong> option from the Profiles section.</p>
<p><a href="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Rule-to-remove-Private.png?ssl=1" data-rel="lightbox-image-7" data-rl_title="" data-rl_caption="" title=""><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-3739" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Rule-to-remove-Private.png?resize=448%2C210&#038;ssl=1" alt="Group Policy - Rule to remove Private" width="448" height="210" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Rule-to-remove-Private.png?w=448&amp;ssl=1 448w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Rule-to-remove-Private.png?resize=250%2C117&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Rule-to-remove-Private.png?resize=360%2C169&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/Group-Policy-Rule-to-remove-Private.png?resize=100%2C47&amp;ssl=1 100w" sizes="auto, (max-width: 448px) 100vw, 448px" /></a></p>
<h2>Test it out</h2>
<p>You can scan the port 5985 on the remote computer to see if it responses, like below:</p>
<pre class="">Test-NetConnection -ComputerName remote_computer -Port Port#</pre>
<p>Oh, simply open a PowerShell session on the remote computer and see if it succeeds.</p>
<pre class="">Enter-PSSession -ComputerName remote_computer</pre>
<p><a href="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/WinRM-est.png?ssl=1" data-rel="lightbox-image-8" data-rl_title="" data-rl_caption="" title=""><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-large wp-image-3741" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/WinRM-est-600x196.png?resize=600%2C196&#038;ssl=1" alt="WinRM - test" width="600" height="196" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/WinRM-est.png?resize=600%2C196&amp;ssl=1 600w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/WinRM-est.png?resize=250%2C82&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/WinRM-est.png?resize=450%2C147&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/WinRM-est.png?resize=768%2C251&amp;ssl=1 768w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/WinRM-est.png?resize=700%2C229&amp;ssl=1 700w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/WinRM-est.png?resize=520%2C170&amp;ssl=1 520w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/WinRM-est.png?resize=360%2C118&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/WinRM-est.png?resize=100%2C33&amp;ssl=1 100w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2018/01/WinRM-est.png?w=845&amp;ssl=1 845w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a></p>The post <a href="https://www.kjctech.net/how-to-enable-winrm-with-domain-group-policy-for-powershell-remoting/">How To Enable WinRM with Domain Group Policy for PowerShell Remoting</a> first appeared on <a href="https://www.kjctech.net">KC's Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://www.kjctech.net/how-to-enable-winrm-with-domain-group-policy-for-powershell-remoting/feed/</wfw:commentRss>
			<slash:comments>10</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3729</post-id>	</item>
	</channel>
</rss>
