{"id":76,"date":"2013-03-11T11:47:52","date_gmt":"2013-03-11T11:47:52","guid":{"rendered":"https:\/\/teacheritblog.wordpress.com\/?p=76"},"modified":"2013-03-11T11:47:52","modified_gmt":"2013-03-11T11:47:52","slug":"force-gp-update-remotely-with-powershell-3-0","status":"publish","type":"post","link":"https:\/\/christianlehrer.com\/?p=76","title":{"rendered":"Force GP-Update remotely with Powershell 3.0"},"content":{"rendered":"<div class=\"shariff\" data-title=\"Force GP-Update remotely with Powershell 3.0\" data-info-url=\"http:\/\/ct.de\/-2467514\" data-backend-url=\"https:\/\/christianlehrer.com\/wp-content\/plugins\/shariff-sharing\/backend\/index.php\" data-temp=\"\/tmp\" data-ttl=\"60\" data-service=\"tlxr\" data-services='[\"facebook\",\"twitter\",\"linkedin\",\"xing\",\"reddit\",\"whatsapp\",\"mail\",\"info\"]' data-image=\"\" data-url=\"https:\/\/christianlehrer.com\/?p=76\" data-lang=\"en\" data-theme=\"white\" data-orientation=\"horizontal\"><\/div><p>One of the new features of Windows Server 2012 is the \u201cinvoke-gpudate\u201d cmdlet in powershell 3.0. <\/p>\n<p>&#160;<\/p>\n<p>With this cmdlet you can force any single client to do a grupdate without having to access the client directly, really cool i think!<\/p>\n<p>&#160;<\/p>\n<p>To make it easier i wrote a short script, that triggers the gpupdate on <strong>only one Client<\/strong> with a two minute delay:<\/p>\n<p>&#160;<\/p>\n<blockquote>\n<p><font size=\"2\" face=\"Times New Roman\">function Pause ($Message=&quot;GPudate successfully sent. Computer will update Policy in 2 Minutes. Press any key to close&quot;)       <br \/>{        <br \/>write-host \u2013NoNewLine $Message        <br \/>$null = $host.UI.rawUI.ReadKey(&quot;NoEcho,IncludeKeyDown&quot;)        <br \/>write-host &quot;&quot;        <br \/>} <\/font><\/p>\n<p><font size=\"2\" face=\"Times New Roman\">$computername = read-host &quot;Please type in FQDN of the Computer to update policy (e.g. pc4711.domain.local) &quot;       <br \/>invoke-gpupdate -computer $computername -randomdelayinminutes 2 -force        <br \/><\/font><\/p>\n<p><font size=\"2\" face=\"Times New Roman\">Pause<\/font><\/p>\n<\/blockquote>\n<p>This script can be run <strong>without having any server 2012<\/strong> installed, all you need is Windows 8 with installed <a href=\"http:\/\/http:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=28972\" target=\"_blank\">Remote Server Administratio tools for Windows 8<\/a>.<\/p>\n<p>&#160;<\/p>\n<p>More info on <a href=\"http:\/\/technet.microsoft.com\/library\/hh967455.aspx\" target=\"_blank\">Technet<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the new features of Windows Server 2012 is the \u201cinvoke-gpudate\u201d cmdlet in powershell 3.0. &#160; With this cmdlet you can force any single client to do a grupdate without having to access the client directly, really cool i think! &#160; To make it easier i wrote a short script, that triggers the gpupdate&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/christianlehrer.com\/index.php?rest_route=\/wp\/v2\/posts\/76"}],"collection":[{"href":"https:\/\/christianlehrer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/christianlehrer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/christianlehrer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/christianlehrer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=76"}],"version-history":[{"count":0,"href":"https:\/\/christianlehrer.com\/index.php?rest_route=\/wp\/v2\/posts\/76\/revisions"}],"wp:attachment":[{"href":"https:\/\/christianlehrer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=76"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/christianlehrer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=76"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/christianlehrer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=76"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}