{"id":4091,"date":"2015-09-14T08:23:19","date_gmt":"2015-09-14T13:23:19","guid":{"rendered":"http:\/\/www.poweradmin.com\/blog\/?p=4091"},"modified":"2015-08-31T08:36:41","modified_gmt":"2015-08-31T13:36:41","slug":"remote-group-policy-update","status":"publish","type":"post","link":"https:\/\/www.poweradmin.com\/blog\/remote-group-policy-update\/","title":{"rendered":"Remote Group Policy Update"},"content":{"rendered":"<p><span style=\"font-family: verdana, geneva, sans-serif;\">With the release of Windows Server 2012 Microsoft added several new features to the server Edition. We\u2019ve already discussed about some of these enhancements and today we\u2019ll continue discovering another one, the remote <a href=\"http:\/\/www.poweradmin.com\/blog\/gpmc-and-group-policy-store-in-windows-server-2008\/\">group policy<\/a> update feature. If you\u2019ve worked on previous <a href=\"http:\/\/www.poweradmin.com\/servermonitor\/?ref=blog\" target=\"_blank\">Windows Server<\/a> Editions you know that the only way in which you could force a group policy update on a machine was by executing gpupdate command. This procedure could be achieved either by using Remote Desktop Connection and executing the command locally in Powershell or by creating a script then using the <i>Invoke-Command<\/i> cmdlet with the <i>gpupdate<\/i> in its script block. Although the second method was efficient it required some extra Powershell scripting knowledge so added extra complexity to the over wall operation. In large enterprises this was the only way in which you\u2019d be able to force a group policy update on multiple servers.<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">Windows Server 2012 added the so called remote group policy update feature which allows Administrators to perform a group policy update procedure on multiple hosts using either the Group Policy Management Console or PowerShell. I\u2019ve personally used this technique and I can assure you that makes your life much better as a <a href=\"http:\/\/www.poweradmin.com\/blog\/top-20-windows-tools-every-sysadmin-should-know\/\">Sysadmin<\/a>. It\u2019s easy to use and I\u2019ve tested it successfully when deploying and testing a lot of group policy objects within my <a href=\"http:\/\/www.poweradmin.com\/blog\/deploying-active-directory-certificate-services-and-online-responder\/\">Active Directory<\/a> environment.<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">You can execute remote group policy update using the group policy management console by right clicking on an organizational unit:<\/span><\/p>\n<p><a href=\"http:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/group-policy-management.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-4092 aligncenter\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/group-policy-management.png\" alt=\"group-policy-management\" width=\"1023\" height=\"470\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/group-policy-management.png 1023w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/group-policy-management-300x138.png 300w\" sizes=\"auto, (max-width: 1023px) 100vw, 1023px\"><\/a><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">You will be prompted that that group policy update will be executed on all objects and subcontainers within the selected organizational unit. Although this mechanism is easy to use, does not allow you to exclude or filter the machines on which the group policy update will run:<\/span><\/p>\n<p><a href=\"http:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/force-group-policy-update.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-4093 aligncenter\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/force-group-policy-update.png\" alt=\"Force-Group-Policy-Update\" width=\"458\" height=\"293\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/force-group-policy-update.png 458w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/force-group-policy-update-300x192.png 300w\" sizes=\"auto, (max-width: 458px) 100vw, 458px\"><\/a><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">Note that you can use this method only on machines running Windows Server 2008, Windows Vista or newer Editions. Once you click the yes button, gpupdate will be scheduled within a 10 minutes interval on all computers within the selected OU. You will be able to view the list of all computers on which the group policy update has run. The wizard will prompt you if any errors occur along with an error description:<\/span><\/p>\n<p><a href=\"http:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/remote-group-policy-updates-results.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-4094 aligncenter\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/remote-group-policy-updates-results.png\" alt=\"Remote-Group-Policy-Updates-Results\" width=\"495\" height=\"427\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/remote-group-policy-updates-results.png 495w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/remote-group-policy-updates-results-300x259.png 300w\" sizes=\"auto, (max-width: 495px) 100vw, 495px\"><\/a><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">You can perform the same operation using Powershell with the new <i>Invoke-GPUpdate<\/i> cmdlet. If the command is executed on a machine without parameters it will schedule a group policy update within a 10 minutes interval only on that particular host. Type <i>get-help Invoke-GPUpdate<\/i> to view the parameters that can be used with this cmdlet:<\/span><\/p>\n<p><a href=\"http:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/invoke-gpupdate.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-4095 aligncenter\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/invoke-gpupdate.png\" alt=\"invoke-gpupdate\" width=\"871\" height=\"179\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/invoke-gpupdate.png 871w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/invoke-gpupdate-300x62.png 300w\" sizes=\"auto, (max-width: 871px) 100vw, 871px\"><\/a><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">You can use the <i>Invoke-GPUpdate \u2013Computer computer_name<\/i> command to specify a remote machine on which group policy will be executed. To extend the range on which group policy will run, use the <i>Get-ADComputer<\/i> command with the following parameters:<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><i>Get-ADComputer -Filter * -SearchBase \u201cOU=Domain Controllers,DC=ppscu,DC=com\u201d<\/i><\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">In the searchable section is where you specify in which OU the operation will run. I\u2019m using a testing environment for this demonstration so I only have one DC in this OU:<\/span><\/p>\n<p><a href=\"http:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/get-adcomputer.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-4096 aligncenter\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/get-adcomputer.png\" alt=\"get-adcomputer\" width=\"870\" height=\"248\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/get-adcomputer.png 870w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/get-adcomputer-300x86.png 300w\" sizes=\"auto, (max-width: 870px) 100vw, 870px\"><\/a><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">We can pipe the results of the command and execute <i>Invoke-GPUpdate<\/i> on all machines that were displayed by <i>Get-ADComputer<\/i>:<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><i>Get-ADComputer -Filter * -SearchBase \u201cOU=Domain Controllers,DC=ppscu,DC=com\u201d | foreach { Invoke-GPUpdate -Computer $_.name }<\/i><\/span><\/p>\n<p><a href=\"http:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/invoke-gpudate.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-4097 aligncenter\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/invoke-gpudate.png\" alt=\"invoke-gpudate\" width=\"840\" height=\"71\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/invoke-gpudate.png 840w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/invoke-gpudate-300x25.png 300w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\"><\/a><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">If we eliminate the <i>\u2013 SearchBase<\/i> parameter, gupdate will run on all computers part of the domain:<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><i>Get-ADComputer -Filter * | foreach {Invoke-GPUpdate -Computer $_.name}<\/i><\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">Using the <i>Get-ADComputer<\/i> filtering option we can modify the scope of the remote group policy update procedure. If you\u2019ve used this command before you already know that you can filter based on all the attributes that a computer object can have such as its Operating System, IPV4 address, etc. You can view all the attributes of a computer object by typing the following command:<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><i>Get-ADComputer computer_name -Properties *<\/i><\/span><\/p>\n<p><a href=\"http:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/get-adcomputer-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-4098 aligncenter\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/get-adcomputer-2.png\" alt=\"get-adcomputer-2\" width=\"722\" height=\"535\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/get-adcomputer-2.png 722w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/get-adcomputer-2-300x222.png 300w\" sizes=\"auto, (max-width: 722px) 100vw, 722px\"><\/a><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">The remote group policy update will create a task in task scheduler, this service must be up and running to successfully run gpupdate. Note that the task will be created under <i>Task Scheduler Library\\Microsoft\\Windows\\GroupPolicy<\/i>:<\/span><\/p>\n<p><a href=\"http:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/task-scheduler.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-4099 aligncenter\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/task-scheduler.png\" alt=\"task-scheduler\" width=\"918\" height=\"657\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/task-scheduler.png 918w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/task-scheduler-300x215.png 300w\" sizes=\"auto, (max-width: 918px) 100vw, 918px\"><\/a><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">Make sure to check out this section if you encounter issues when using the group policy remote update procedure. Tasks have an expiration date so they will be automatically deleted after a period of time.<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">I\u2019ve never worked in an enterprise that was using local <a href=\"http:\/\/www.poweradmin.com\/blog\/how-to-use-windows-firewall-to-authorize-connections\/\">Windows Server Firewall<\/a> because it\u2019s still not good enough when talking about firewall rules propagation and scalability so in most cases you\u2019ll find it disabled. Large enterprises use dedicated firewall devices or servers to create the security policies they need so often the Windows Firewall is disabled through group policy. If you use Windows Firewall within your domain you\u2019ll need to make sure that the firewall rules are created for remote group policy update to work. Microsoft created a starter group policy object for this feature so you can simply link it to the domain:<\/span><\/p>\n<p><a href=\"http:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/group-policy-remote-update-firewall-ports.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-4100 aligncenter\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/group-policy-remote-update-firewall-ports.png\" alt=\"group-policy-remote-update-firewall-ports\" width=\"1019\" height=\"457\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/group-policy-remote-update-firewall-ports.png 1019w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/group-policy-remote-update-firewall-ports-300x135.png 300w\" sizes=\"auto, (max-width: 1019px) 100vw, 1019px\"><\/a><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">Multiple group policy cmdlets were introduced by Microsoft with the release of Windows Server 2012, you can explore them by checking the GroupPolicy module in Windows Powershell using <i>Get-Command -Module GroupPolicy<\/i>:<\/span><\/p>\n<p><a href=\"http:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/get-command.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-4101 aligncenter\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/get-command.png\" alt=\"get-command\" width=\"634\" height=\"461\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/get-command.png 634w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2015\/08\/get-command-300x218.png 300w\" sizes=\"auto, (max-width: 634px) 100vw, 634px\"><\/a><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">That\u2019s about it for this article folks, hope you\u2019ve understood this simple but yet usefully feature that was introduced with the latest Windows Server Edition. Wish you all the best and stay tuned for the following articles from our blog.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>With the release of Windows Server 2012 Microsoft added several new features to the server Edition. We\u2019ve already discussed about some of these enhancements and today we\u2019ll continue discovering another one, the remote group policy update feature. If you\u2019ve worked on previous Windows Server Editions you know that the only way in which you could [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":4100,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,9,8],"tags":[],"class_list":["post-4091","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","category-technical","category-windows"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/4091","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/comments?post=4091"}],"version-history":[{"count":3,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/4091\/revisions"}],"predecessor-version":[{"id":4104,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/4091\/revisions\/4104"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/media\/4100"}],"wp:attachment":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/media?parent=4091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/categories?post=4091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/tags?post=4091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}