{"id":120,"date":"2013-08-08T16:00:00","date_gmt":"2013-08-08T16:00:00","guid":{"rendered":"https:\/\/teacheritblog.wordpress.com\/?p=120"},"modified":"2013-08-08T16:00:00","modified_gmt":"2013-08-08T16:00:00","slug":"configmgr-speed-up-ad-group-discovered-client-push-installation-sccm","status":"publish","type":"post","link":"https:\/\/christianlehrer.com\/?p=120","title":{"rendered":"#ConfigMgr Speed up AD-Group discovered Client Push Installation #SCCM"},"content":{"rendered":"<div class=\"shariff\" data-title=\"#ConfigMgr Speed up AD-Group discovered Client Push Installation #SCCM\" 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=\"http:\/\/teacheritblog.files.wordpress.com\/2013\/08\/image_thumb3.png\" data-url=\"https:\/\/christianlehrer.com\/?p=120\" data-lang=\"en\" data-theme=\"white\" data-orientation=\"horizontal\"><\/div><p>Imagine the following situation:<\/p>\n<p>You have to deploy SCCM a well controlled and step by step. You want to use (automatic) push installation.<\/p>\n<p>This can be done by putting the PCs you want into AD-groups and throw some GPOs at them, to add an ConfigMgrPush Account to local admins for example. <\/p>\n<p>Then Active Directory Group Discovery has to be set up to discover items in the selected AD-Group.<\/p>\n<p>Now, when you put in a PC to this AD-Group, it will be discovered in a short time (5 Minutes in standard delta discovery settings).<\/p>\n<p>After discovery, SCCM will try to push the client to the new PCs but it fails, because the ConfigMgr push account is not a local admin. This happens, because a reboot is needed for the PC to be aware of new group memberships and applying the GPO.<\/p>\n<p>You now can wait until every PC is rebooted, or do the following:<\/p>\n<p>&#160;<\/p>\n<p>Create a collection for PCs without an installed client:<\/p>\n<p><a href=\"http:\/\/teacheritblog.files.wordpress.com\/2013\/08\/image3.png\"><img decoding=\"async\" loading=\"lazy\" title=\"image\" style=\"background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border-width:0;\" border=\"0\" alt=\"image\" src=\"http:\/\/teacheritblog.files.wordpress.com\/2013\/08\/image_thumb3.png\" width=\"509\" height=\"462\" \/><\/a><\/p>\n<p>Add a new query rule<\/p>\n<p><a href=\"http:\/\/teacheritblog.files.wordpress.com\/2013\/08\/image4.png\"><img decoding=\"async\" loading=\"lazy\" title=\"image\" style=\"background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border-width:0;\" border=\"0\" alt=\"image\" src=\"http:\/\/teacheritblog.files.wordpress.com\/2013\/08\/image_thumb4.png\" width=\"506\" height=\"465\" \/><\/a><\/p>\n<p>Click \u201cShow query language\u201d and paste the query (delete linebreaks after inserting)<\/p>\n<blockquote>\n<p>select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,     <br \/>SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,      <br \/>SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.ResourceId not in (select SMS_R_System.ResourceId from&#160; SMS_R_System where SMS_R_System.Client = 1) and (SMS_R_System.OperatingSystemNameandVersion = &quot;Microsoft Windows NT Workstation 6.1&quot;)&#160;&#160;&#160;&#160;&#160; <\/p>\n<p align=\"justify\">&#160;<\/p>\n<\/blockquote>\n<p><a href=\"http:\/\/teacheritblog.files.wordpress.com\/2013\/08\/image5.png\"><img decoding=\"async\" loading=\"lazy\" title=\"image\" style=\"border-top:0;border-right:0;background-image:none;border-bottom:0;padding-top:0;padding-left:0;border-left:0;display:inline;padding-right:0;\" border=\"0\" alt=\"image\" src=\"http:\/\/teacheritblog.files.wordpress.com\/2013\/08\/image_thumb5.png\" width=\"375\" height=\"418\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<p><a href=\"http:\/\/teacheritblog.files.wordpress.com\/2013\/08\/image6.png\"><img decoding=\"async\" loading=\"lazy\" title=\"image\" style=\"border-top:0;border-right:0;background-image:none;border-bottom:0;padding-top:0;padding-left:0;border-left:0;display:inline;padding-right:0;\" border=\"0\" alt=\"image\" src=\"http:\/\/teacheritblog.files.wordpress.com\/2013\/08\/image_thumb6.png\" width=\"375\" height=\"378\" \/><\/a><\/p>\n<p>Now that you have created the collection, it\u00b4s time for some Powershell and <a href=\"http:\/\/technet.microsoft.com\/en-us\/sysinternals\/bb897553\" target=\"_blank\">psexec<\/a>.<\/p>\n<p>Download psexec and place it somewhere on your SCCM Server, e.g. c:psexec<\/p>\n<p>Create a powershell script that gets all members of the \u201cno client\u201d Collection, <a href=\"http:\/\/teacheritblog.wordpress.com\/2013\/08\/06\/refresh-active-directory-group-membership-of-pc-without-reboot\/\" target=\"_blank\">refreshes PC AD-Group Membership<\/a> and forces a gpupdate:<\/p>\n<blockquote>\n<p>$SiteServer = &#8216;localhost&#8217;<\/p>\n<p># Replace&#160; YSC with your SiteCode<\/p>\n<p>$SiteCode = &#8216;YSC&#8217;      <br \/>&#160; <br \/>$CollectionName = &#8216;All Windows 7 PCs without installed Clients&#8217;      <br \/>&#160; <br \/>#Retrieve SCCM collection by name      <br \/>&#160; <br \/>$Collection = get-wmiobject -NameSpace &quot;ROOTSMSsite_$SiteCode&quot; -Class SMS_Collection | where {$_.Name -eq &quot;$CollectionName&quot;}      <br \/>&#160; <br \/>#Retrieve members of collection      <br \/>&#160; <br \/>$SMSClients = Get-WmiObject -ComputerName $SiteServer -Namespace &quot;ROOTSMSsite_$SiteCode&quot; -Query &quot;SELECT * FROM SMS_FullCollectionMembership WHERE CollectionID=&#8217;$($Collection.CollectionID)&#8217; order by name&quot; | select Name      <br \/>&#160; <br \/>#Try to Refresh AD-Goup Membership and force gpupdate for every collectionmember      <br \/>&#160; <br \/>ForEach ($SMSClient in $SMSClients){      <br \/>&#160; <br \/>write-host &quot;Next Client:&quot; $SMSClient.Name      <br \/>$hostname = $smsclient.name<\/p>\n<p>c:psexecpsexec.exe \\$hostname -s cmd \/c &quot;klist -li 0x3e7 purge&quot;     <br \/>c:psexecpsexec.exe \\$hostname -s cmd \/c &quot;gpupdate \/force&quot;       <br \/>&#160; <br \/>}<\/p>\n<\/blockquote>\n<p>If the script runs successfully, you will get an output like<\/p>\n<p><a href=\"http:\/\/teacheritblog.files.wordpress.com\/2013\/08\/image7.png\"><img decoding=\"async\" loading=\"lazy\" title=\"image\" style=\"border-top:0;border-right:0;background-image:none;border-bottom:0;padding-top:0;padding-left:0;border-left:0;display:inline;padding-right:0;\" border=\"0\" alt=\"image\" src=\"http:\/\/teacheritblog.files.wordpress.com\/2013\/08\/image_thumb7.png\" width=\"486\" height=\"311\" \/><\/a><\/p>\n<p>To get this working, the account running the script needs to have the right to access the client PC!<\/p>\n<p>Now that the group policy is applied, the ConfigMgr Push Account can install the client.<\/p>\n<p>To go even further you could schedule this task, or even better, let Orchestrator do the job. <\/p>\n<p>&#160;<\/p>\n<p>sources: <\/p>\n<p><a title=\"http:\/\/www.jgsys.co.uk\/blog\/sccm-2012-pcs-without-client\/\" href=\"http:\/\/www.jgsys.co.uk\/blog\/sccm-2012-pcs-without-client\/\">http:\/\/www.jgsys.co.uk\/blog\/sccm-2012-pcs-without-client\/<\/a><\/p>\n<p><a title=\"http:\/\/www.systemcentercentral.com\/ping-sccm-collection-members-with-powershell-sample-script-for-configmgr-2007-and-2012\/\" href=\"http:\/\/www.systemcentercentral.com\/ping-sccm-collection-members-with-powershell-sample-script-for-configmgr-2007-and-2012\/\">http:\/\/www.systemcentercentral.com\/ping-sccm-collection-members-with-powershell-sample-script-for-configmgr-2007-and-2012\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Imagine the following situation: You have to deploy SCCM a well controlled and step by step. You want to use (automatic) push installation. This can be done by putting the PCs you want into AD-groups and throw some GPOs at them, to add an ConfigMgrPush Account to local admins for example. Then Active Directory Group&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11,21,26],"tags":[44,63,83,87,91],"_links":{"self":[{"href":"https:\/\/christianlehrer.com\/index.php?rest_route=\/wp\/v2\/posts\/120"}],"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=120"}],"version-history":[{"count":0,"href":"https:\/\/christianlehrer.com\/index.php?rest_route=\/wp\/v2\/posts\/120\/revisions"}],"wp:attachment":[{"href":"https:\/\/christianlehrer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/christianlehrer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/christianlehrer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}