{"id":1513,"date":"2015-01-04T21:57:27","date_gmt":"2015-01-04T13:57:27","guid":{"rendered":"http:\/\/www.jhouseconsulting.com\/?p=1513"},"modified":"2015-01-05T00:09:53","modified_gmt":"2015-01-04T16:09:53","slug":"custom-mdt-wizard-for-network-settings","status":"publish","type":"post","link":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/2015\/01\/04\/custom-mdt-wizard-for-network-settings-1513","title":{"rendered":"Custom MDT Wizard For Network Settings"},"content":{"rendered":"<p>Setting a fixed IP Address during the MDT task sequences has always been ugly. It&#8217;s an area that I believe needs to be revisited by Microsoft.<\/p>\n<ul>\n<li>I don&#8217;t like the concept behind the &#8220;Apply Network Settings&#8221; task action. I don&#8217;t find it dynamic enough. In my opinion it&#8217;s too cumbersome and involved.<\/li>\n<li>The old &#8220;NICSettings_Definition_ENU.xml&#8221; custom pane no longer works from MDT 2012 and above as pointed out by a commenter on Michael Niehaus article about <a href=\"http:\/\/blogs.technet.com\/b\/mniehaus\/archive\/2012\/01\/07\/customizing-wizards-with-mdt-2012.aspx\" target=\"_blank\">Customizing Wizards with MDT 2012<\/a>.<\/li>\n<li>I don&#8217;t like the way the ZTINicUtility.vbs and ZTINICConfig.wsf scripts have been constructed. Too messy and too hard to follow. I appreciate that these have ended up the way they are over time, but a fresh start would be my recommendation.<\/li>\n<\/ul>\n<p>I just found that everything out of the box was too messy and static. There are a couple of different blogs by others on this, but they also seemed quite awkward.<\/p>\n<p>Of course if you&#8217;re looking to\u00a0automate as much as possible, which is what I strive for, then some back-end apps require a fixed\/static IP address set before they&#8217;re installed. Sure you can reserve addresses in DHCP, but that&#8217;s a management touch point I wanted to avoid. I prefer to allocate in the design and build out based on that.<\/p>\n<p>I wanted something slick and simple so I created my own.<!--more--><\/p>\n<p>The following screen shot is what the wizard first looks like when launched.<\/p>\n<p><a href=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2015\/01\/MDT_Network_Adapter_Configuration_Custom_Wizard_DHCP.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-1514\" title=\"MDT Custom Wizard-Network Adapter Configuration-DHCP\" src=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2015\/01\/MDT_Network_Adapter_Configuration_Custom_Wizard_DHCP.png\" alt=\"MDT Custom Wizard-Network Adapter Configuration-DHCP\" width=\"700\" height=\"523\" srcset=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2015\/01\/MDT_Network_Adapter_Configuration_Custom_Wizard_DHCP.png 1037w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2015\/01\/MDT_Network_Adapter_Configuration_Custom_Wizard_DHCP-300x224.png 300w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2015\/01\/MDT_Network_Adapter_Configuration_Custom_Wizard_DHCP-768x574.png 768w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2015\/01\/MDT_Network_Adapter_Configuration_Custom_Wizard_DHCP-1024x765.png 1024w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><\/p>\n<p>The cool thing here is that when you select the &#8220;Use Static IP Settings&#8221; radio button, it automatically populates the required fields\u00a0from the current adapter settings. This assists the person initiating the deployment because all they typically need to do is change\u00a0the IP Address.<\/p>\n<p><a href=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2015\/01\/MDT_Network_Adapter_Configuration_Custom_Wizard_Static.png\"><img decoding=\"async\" class=\"aligncenter wp-image-1515\" title=\"MDT Custom Wizard-Network Adapter Configuration-Static\" src=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2015\/01\/MDT_Network_Adapter_Configuration_Custom_Wizard_Static.png\" alt=\"MDT Custom Wizard-Network Adapter Configuration-Static\" width=\"700\" height=\"527\" srcset=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2015\/01\/MDT_Network_Adapter_Configuration_Custom_Wizard_Static.png 1033w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2015\/01\/MDT_Network_Adapter_Configuration_Custom_Wizard_Static-300x226.png 300w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2015\/01\/MDT_Network_Adapter_Configuration_Custom_Wizard_Static-768x578.png 768w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2015\/01\/MDT_Network_Adapter_Configuration_Custom_Wizard_Static-1024x771.png 1024w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><\/p>\n<p>As you can see this version of the script allows you to set 4 values:<\/p>\n<ul>\n<li>IP Address<\/li>\n<li>Subnet Mask<\/li>\n<li>Default Gateway<\/li>\n<li>DNS Server Search Order<\/li>\n<\/ul>\n<p>Regardless of whether or not you select DHCP or Static IP the script is hard coded to:<\/p>\n<ul>\n<li>Disable NetBIOS over TCP\/IP, which in this day and age should be a best practice. It should also be the Operating System default. Are you listening Microsoft?<\/li>\n<li>Enable the &#8220;Register this connection&#8217;s address in DNS&#8221;, which is default.<\/li>\n<li>Disable the &#8220;Use this connection&#8217;s addresses in DNS&#8221;, which is default.<\/li>\n<\/ul>\n<p>I&#8217;m actually reusing 6 existing task sequence variables and creating 1 new one:<\/p>\n<ul>\n<li>OSDAdapterCount<\/li>\n<li>OSDAdapter0EnableDHCP<\/li>\n<li>OSDAdapter0IPAddressList<\/li>\n<li>OSDAdapter0SubnetMask<\/li>\n<li>OSDAdapter0Gateways<\/li>\n<li>OSDAdapter0DNSServerList<\/li>\n<li>SkipNetworkSettings<\/li>\n<\/ul>\n<p>So\u00a0to implement it simply download the\u00a0following 3 files, remove the &#8220;_.txt&#8221; extension, and place them in the\u00a0%SCRIPTROOT% (Scripts) folder of your deployment share.<\/p>\n<ul>\n<li><a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"\" href=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/download\/1525\/?tmstv=1776914519\" rel=\"nofollow\" id=\"download-link-1525\" data-redirect=\"false\" >\n\tDeployWiz_NICSettings.xml\t(2477 downloads\t)\n<\/a>\n<\/li>\n<li><a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"\" href=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/download\/1527\/?tmstv=1776914519\" rel=\"nofollow\" id=\"download-link-1527\" data-redirect=\"false\" >\n\tDeployWiz_NICSettings.vbs\t(2348 downloads\t)\n<\/a>\n<\/li>\n<li><a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"\" href=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/download\/1530\/?tmstv=1776914519\" rel=\"nofollow\" id=\"download-link-1530\" data-redirect=\"false\" >\n\tSet-IPV4Address.ps1\t(2532 downloads\t)\n<\/a>\n<\/li>\n<\/ul>\n<p>Edit the &#8220;DeployWiz_Definition_ENU.xml&#8221; and add the following lines after the\u00a0DeployWiz_ComputerName.xml pane has been added.<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; toolbar: false; notranslate\" title=\"\">\r\n&lt;Pane id=&quot;NICSettings&quot; reference=&quot;DeployWiz_NICSettings.xml&quot;&gt;\r\n&lt;Condition&gt;&lt;!&#x5B;CDATA&#x5B;UCASE(Property(&quot;SkipNetworkSettings&quot;))&lt;&gt;&quot;YES&quot; ]]&gt;&lt;\/Condition&gt;\r\n&lt;\/Pane&gt;\r\n<\/pre>\n<p>The condition means that the pane will not\u00a0show if the\u00a0SkipNetworkSettings is set to YES. Hence the new variable.<\/p>\n<p>So now we modify the CustomSettings.ini<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; toolbar: false; notranslate\" title=\"\">\r\n&#x5B;Settings]\r\n; Add SkipNetworkSettings as a new property\r\nProperties=SkipNetworkSettings\r\n\r\n&#x5B;Default]\r\n; NIC Settings\r\n; If you set SkipNetworkSettings to YES, either remove\/disable the Set-IPV4Address.ps1 PowerShell\r\n; script from\/in the Task Sequence or set the OSDAdapterCount=1 and OSDAdapter0EnableDHCP=TRUE in\r\n; the CustomerSettings.ini. This ensures these are no errors during the build process.\r\nSkipNetworkSettings=NO\r\n;OSDAdapterCount=1\r\n;OSDAdapter0EnableDHCP=TRUE\r\n<\/pre>\n<p>All that&#8217;s left to do is to add a &#8220;Run PowerShell Script&#8221; action to run\u00a0the &#8220;%SCRIPTROOT%\\Set-IPV4Address.ps1&#8221; PowerShell script. You can place this action\u00a0where ever you think it&#8217;s appropriate in your sequence. The following screen shot shows where I place it for most builds. The example I&#8217;m showing is the top half of my sequence for building Citrix Provisioning Services servers.<\/p>\n<p><a href=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2015\/01\/MDT-Task-Sequence-Set-IPV4Address.ps1_.png\"><img decoding=\"async\" class=\"aligncenter wp-image-1517\" title=\"MDT Task Sequence-Set-IPV4Address.ps1\" src=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2015\/01\/MDT-Task-Sequence-Set-IPV4Address.ps1_.png\" alt=\"MDT Task Sequence-Set-IPV4Address.ps1\" width=\"700\" height=\"623\" srcset=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2015\/01\/MDT-Task-Sequence-Set-IPV4Address.ps1_.png 728w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2015\/01\/MDT-Task-Sequence-Set-IPV4Address.ps1_-300x267.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><\/p>\n<p>I wrote the Set-IPV4Address.ps1 PowerShell script so that it can be run independently and used for other purposes, so it&#8217;s quite a versatile script. It&#8217;s fully documented throughout.<\/p>\n<p>I will build on this as I get time, but please let me know if there is anything you feel I haven&#8217;t considered or if there is something you would like added.<\/p>\n<p>Perhaps Microsoft will like what I&#8217;ve done and integrate my code with the next release of MDT \ud83d\ude42<\/p>\n<p>Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Setting a fixed IP Address during the MDT task sequences has always been ugly. It&#8217;s an area that I believe needs to be revisited by Microsoft. I don&#8217;t like the concept behind the &#8220;Apply Network Settings&#8221; task action. I don&#8217;t find it dynamic enough. In my opinion it&#8217;s too cumbersome and involved. The old &#8220;NICSettings_Definition_ENU.xml&#8221; &#8230; <a title=\"Custom MDT Wizard For Network Settings\" class=\"read-more\" href=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/2015\/01\/04\/custom-mdt-wizard-for-network-settings-1513\" aria-label=\"Read more about Custom MDT Wizard For Network Settings\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[388,389,5],"tags":[392,396,394,390,393,397,391,341,340,395,62,409],"class_list":["post-1513","post","type-post","status-publish","format-standard","hentry","category-mdt","category-osd","category-scripting","tag-custom-wizard","tag-fixed","tag-ip-address","tag-mdt","tag-network-settings","tag-nic","tag-osd","tag-posh","tag-powershell","tag-static","tag-vbscript","tag-xml"],"aioseo_notices":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/posts\/1513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/comments?post=1513"}],"version-history":[{"count":10,"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/posts\/1513\/revisions"}],"predecessor-version":[{"id":1536,"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/posts\/1513\/revisions\/1536"}],"wp:attachment":[{"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/media?parent=1513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/categories?post=1513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/tags?post=1513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}