{"id":216,"date":"2021-09-01T13:18:34","date_gmt":"2021-09-01T17:18:34","guid":{"rendered":"https:\/\/www.anthonyfontanez.com\/?p=216"},"modified":"2021-09-05T15:56:34","modified_gmt":"2021-09-05T19:56:34","slug":"configmgr-client-deployment-via-software-update","status":"publish","type":"post","link":"https:\/\/anthonyfontanez.com\/index.php\/2021\/09\/01\/configmgr-client-deployment-via-software-update\/","title":{"rendered":"ConfigMgr Client Deployment via Software Update"},"content":{"rendered":"\n<p>Hey folks, here with a quick post today in response to a question about ConfigMgr client deployment in the <a rel=\"noreferrer noopener\" href=\"https:\/\/winadmins.io\/\" data-type=\"URL\" data-id=\"https:\/\/winadmins.io\/\" target=\"_blank\">WinAdmins Community<\/a> the other day. The question was posed in regards to alternative ways to deploy the CM client without using Client Push, because Client Push is bad and no one should use it for various reasons. The common answer is to use some form of startup script, such as the <a rel=\"noreferrer noopener\" href=\"https:\/\/www.andersrodland.com\/configmgr-client-health\/\" data-type=\"URL\" data-id=\"https:\/\/www.andersrodland.com\/configmgr-client-health\/\" target=\"_blank\">ConfigMgr Client Health Script<\/a> by Anders R\u00f8dland, or the <a href=\"https:\/\/home.memftw.com\/configmgr-client-startup-script\/\" data-type=\"URL\" data-id=\"https:\/\/home.memftw.com\/configmgr-client-startup-script\/\" target=\"_blank\" rel=\"noreferrer noopener\">ConfigMgr Client Startup Script<\/a> by Jason Sandys. However, there&#8217;s another method that can be used in environments where using scripts like this is not desirable for one reason or another: software update based client deployment. Microsoft documents this use <a rel=\"noreferrer noopener\" href=\"https:\/\/docs.microsoft.com\/mem\/configmgr\/core\/clients\/deploy\/deploy-clients-to-windows-computers#BKMK_ClientSUP\" data-type=\"URL\" data-id=\"https:\/\/docs.microsoft.com\/mem\/configmgr\/core\/clients\/deploy\/deploy-clients-to-windows-computers#BKMK_ClientSUP\" target=\"_blank\">here<\/a>, however, I feel that their method could be made a bit more flexible.<\/p>\n\n\n\n<p><em>WARNING: This post will go over directly setting registry items that are normally configured via Group Policy administrative templates, which may or not be 100% supported. It works it theory and in practice, but be forewarned, your mileage may vary, etc.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>At least one active Software Update Point in your ConfigMgr site<\/li><li>Updates classification enabled in SUP configuration<\/li><li>Software update based client installation option enabled<\/li><li>ConfigMgr site published to Active Directory<ul><li>Since software update based deployment does not support custom installation parameters, it must be able to discover the CM site information from AD<\/li><\/ul><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Configuration<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>Microsoft&#8217;s recommendation is to configure a Group Policy Object using the Windows Update admin template, similar to the following:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"634\" src=\"https:\/\/www.anthonyfontanez.com\/wp-content\/uploads\/2021\/09\/image-1-1024x634.png\" alt=\"\" class=\"wp-image-218\" srcset=\"https:\/\/anthonyfontanez.com\/wp-content\/uploads\/2021\/09\/image-1-1024x634.png 1024w, https:\/\/anthonyfontanez.com\/wp-content\/uploads\/2021\/09\/image-1-300x186.png 300w, https:\/\/anthonyfontanez.com\/wp-content\/uploads\/2021\/09\/image-1-768x475.png 768w, https:\/\/anthonyfontanez.com\/wp-content\/uploads\/2021\/09\/image-1.png 1028w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Specify intranet Microsoft update service location<\/figcaption><\/figure><\/div>\n\n\n\n<p>This seems pretty simple, but now you need to think about where it is linked. This setting should <strong>not<\/strong> be configured via Group Policy on CM-managed clients, so we need a way for it to no longer apply once the client is installed. Aha, I&#8217;ll use a WMI filter!<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"theme:plain-white lang:batch decode:true \">select Name from Win32_service where Name = 'ccmexec'<\/pre><\/div>\n\n\n\n<p>But that will filter on computers with the service, not without, and I don&#8217;t think it&#8217;s quick and easy to make a &#8220;not&#8221; version of that query. Welcome to the stage, Group Policy Preferences, and Item Level Targeting!<\/p>\n\n\n\n<p>Instead of using the admin template, create 3 new computer registry preferences, as follows (replace &#8220;https:\/\/CM-SUP.ad.domain.tld:8531&#8221; with your top-level Software Update Point URL):<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"theme:plain-white lang:batch decode:true \">Hive:       HKLM\nKey Path:   SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate\nValue Name: WUServer\nValue Type: String\nValue Data: https:\/\/CM-SUP.ad.domain.tld:8531\n\nHive:       HKLM\nKey Path:   SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate\nValue Name: WUStatusServer\nValue Type: String\nValue Data: https:\/\/CM-SUP.ad.domain.tld:8531\n\nHive:       HKLM\nKey Path:   SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU\nValue Name: UseWUServer\nValue Type: DWORD\nValue Data: 1<\/pre><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"455\" src=\"https:\/\/www.anthonyfontanez.com\/wp-content\/uploads\/2021\/09\/image-4.png\" alt=\"\" class=\"wp-image-221\" srcset=\"https:\/\/anthonyfontanez.com\/wp-content\/uploads\/2021\/09\/image-4.png 400w, https:\/\/anthonyfontanez.com\/wp-content\/uploads\/2021\/09\/image-4-264x300.png 264w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><figcaption>Example configuration of WUServer value<\/figcaption><\/figure><\/div>\n\n\n\n<p>Next, configure each of these preferences with Item Level Targeting:<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"theme:plain-white lang:batch decode:true \">Item Type:    Registry Match\nItem Options: Is Not\nMatch Type:   Key Exists\nHive:         HKEY_LOCAL_MACHINE\nKey Path:     SYSTEM\\CurrentControlSet\\Services\\CcmExec<\/pre><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"683\" height=\"440\" src=\"https:\/\/www.anthonyfontanez.com\/wp-content\/uploads\/2021\/09\/image-3.png\" alt=\"\" class=\"wp-image-220\" srcset=\"https:\/\/anthonyfontanez.com\/wp-content\/uploads\/2021\/09\/image-3.png 683w, https:\/\/anthonyfontanez.com\/wp-content\/uploads\/2021\/09\/image-3-300x193.png 300w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><figcaption>Targeting Editor<\/figcaption><\/figure><\/div>\n\n\n\n<p>Once this GPO is configured, link it to an OU containing computer objects that you want to target, and when they next scan for updates, they will only be offered the ConfigMgr client, and become managed!<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"993\" height=\"519\" src=\"https:\/\/www.anthonyfontanez.com\/wp-content\/uploads\/2021\/09\/image-5.png\" alt=\"\" class=\"wp-image-239\" srcset=\"https:\/\/anthonyfontanez.com\/wp-content\/uploads\/2021\/09\/image-5.png 993w, https:\/\/anthonyfontanez.com\/wp-content\/uploads\/2021\/09\/image-5-300x157.png 300w, https:\/\/anthonyfontanez.com\/wp-content\/uploads\/2021\/09\/image-5-768x401.png 768w\" sizes=\"auto, (max-width: 993px) 100vw, 993px\" \/><figcaption>Windows Server 2022 Core host scanning against SUP to install the CM Client<\/figcaption><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Hey folks, here with a quick post today in response to a question about ConfigMgr client deployment in the WinAdmins Community the other day. The<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[8],"tags":[4],"class_list":["post-216","post","type-post","status-publish","format-standard","hentry","category-configmgr","tag-configmgr"],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/anthonyfontanez.com\/index.php\/wp-json\/wp\/v2\/posts\/216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/anthonyfontanez.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anthonyfontanez.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anthonyfontanez.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/anthonyfontanez.com\/index.php\/wp-json\/wp\/v2\/comments?post=216"}],"version-history":[{"count":13,"href":"https:\/\/anthonyfontanez.com\/index.php\/wp-json\/wp\/v2\/posts\/216\/revisions"}],"predecessor-version":[{"id":242,"href":"https:\/\/anthonyfontanez.com\/index.php\/wp-json\/wp\/v2\/posts\/216\/revisions\/242"}],"wp:attachment":[{"href":"https:\/\/anthonyfontanez.com\/index.php\/wp-json\/wp\/v2\/media?parent=216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anthonyfontanez.com\/index.php\/wp-json\/wp\/v2\/categories?post=216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anthonyfontanez.com\/index.php\/wp-json\/wp\/v2\/tags?post=216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}