<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Paul J Hadad - ConfigMgr Guy</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/paul_hadad_blog/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/paul_hadad_blog/feed.xml</link>
    <description>Paul Hadad Senior Consultant Microsoft  -  Client Deployment / Configuration Manager</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:31:18 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Running Automated Scripts in WinPE</title>
      <link>https://docs.microsoft.com/archive/blogs/paul_hadad_blog/running-automated-scripts-in-winpe</link>
      <pubDate>Tue, 26 Jul 2016 19:14:25 GMT</pubDate>
      <dc:creator><![CDATA[Paul_CM]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/paul_hadad_blog/?p=45</guid>
      <description><![CDATA[In WinPE you can use an answer file to specify different settings and actions. When Windows PE...]]></description>
      <content:encoded><![CDATA[In WinPE you can use an answer file to specify different settings and actions. When Windows PE Starts, it looks for a file called Unattend.xml at the root of any bootable device. This is particularly handy since I need to configure the device before it can even get on the network and see a SCCM Task Sequence to run. Just some background as this work was performed using SCCM version 1602 and Modifying a MDT (x64) Integrated Boot image.

This HP model HP Elite x2 1012 G1 Tablet has an external Thunderbolt Docking station with a wired connection that we need to get working in WinPE prior to starting the Task Sequence. I added an HP driver for the thunderbolt to WinPE and created a script that the unattend.xml kicks off, that calls the HP BCU utility. This utility does a nice job of configuring the BIOS and reading the currently applied settings. Let’s take a closer look at this configuration.

The Thunderbolt dock requires the machine BIOS be set to the following security Setting.
<p style="text-align: center">*PCIe and DisplayPort - No Security</p>
   1.First you mount the boot image to make some customizations. The Script that we use in this example is written in PowerShell so don’t forget to add this optional component to the boot image.

Steps to Mount Boot Image:<a href="https://technet.microsoft.com/en-us/library/hh824814.aspx">https://technet.microsoft.com/en-us/library/hh824814.aspx2.</a>

2.Add an HP folder at the Root of the boot image that contains the biosconfigutility64.exe Utility and a bat file that will be called by the unattend.xml that kicks off the script.

<a href="https://blogs.technet.microsoft.com/paul_hadad_blog/2016/07/26/running-automated-scripts-in-winpe/hp_folder/" rel="attachment wp-att-65"><img width="1248" height="307" class="alignnone size-full wp-image-65" alt="HP_Folder" src="https://msdnshared.blob.core.windows.net/media/2016/07/HP_Folder.jpg" /></a>

&nbsp;

Thunderbolt.cmd (contains one line to execute PS1 script)

<strong>Powershell.exe -executionpolicy unrestricted -file x:\hp\thunderbolt.ps1</strong>

<strong>Note:</strong> You can also include any other required files that could also modify the bios to convert it from Legacy to UEFI.

<a href="https://blogs.technet.microsoft.com/paul_hadad_blog/2016/07/26/running-automated-scripts-in-winpe/root_winpe-2/" rel="attachment wp-att-96"><img width="1393" height="544" class="alignnone size-full wp-image-96" alt="Root_winpe" src="https://msdnshared.blob.core.windows.net/media/2016/07/Root_winpe1.jpg" /></a>

3. Add the Unattend.xml file to the root of the boot Image that includes a RunAsynchronousCommand. You can see the command that runs the bat file we created in Step B.

<a href="https://blogs.technet.microsoft.com/paul_hadad_blog/2016/07/26/running-automated-scripts-in-winpe/root_winpe/" rel="attachment wp-att-85"></a><a href="https://blogs.technet.microsoft.com/paul_hadad_blog/?attachment_id=75" rel="attachment wp-att-75"></a>
<p style="text-align: left">&lt;?xml version="1.0" encoding="utf-8"?&gt;</p>
<p style="text-align: left">&lt;unattend xmlns="urn:schemas-microsoft-com:unattend"&gt;</p>
<p style="text-align: left">&lt;settings pass="windowsPE"&gt;</p>
<p style="text-align: left">&lt;component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="https://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"&gt;</p>
<p style="text-align: left">&lt;RunAsynchronous&gt;</p>
<p style="text-align: left">&lt;RunAsynchronousCommand wcm:action="add"&gt;</p>
<p style="text-align: left"><span style="color: #99cc00">&lt;Path&gt;cmd /c x:\HP\Thunderbolt.cmd&lt;/Path&gt;</span></p>
<p style="text-align: left">&lt;Order&gt;1&lt;/Order&gt;</p>
<p style="text-align: left">&lt;Description&gt;Set Thunderbolt&lt;/Description&gt;</p>
<p style="text-align: left">&lt;/RunAsynchronousCommand&gt;</p>
<p style="text-align: left">&lt;/RunAsynchronous&gt;</p>
<p style="text-align: left">&lt;/component&gt;</p>
<p style="text-align: left">&lt;/settings&gt;</p>
<p style="text-align: left">&lt;cpi:offlineImage cpi:source="wim:c:/temp/en_windows_10_enterprise_version_1511_x64_dvd_7224901/sources/install.wim#Windows 10 Enterprise Technical Preview" xmlns:cpi="urn:schemas-microsoft-com:cpi" /&gt;</p>
<p style="text-align: left">&lt;/unattend&gt;</p>
<strong>Note:</strong> Only a handful of components are supported with the WinPE boot image.

You can create an answer file and include any of the following settings for use with Windows PE:
<ul>
 	<li>Microsoft-Windows-Setup/<a href="https://msdn.microsoft.com/library/windows/hardware/dn915285">Display</a></li>
 	<li>Microsoft-Windows-Setup/<a href="https://msdn.microsoft.com/library/windows/hardware/dn915375">EnableFirewall</a></li>
 	<li>Microsoft-Windows-Setup/<a href="https://msdn.microsoft.com/library/windows/hardware/dn915383">EnableNetwork</a></li>
 	<li>Microsoft-Windows-Setup/<a href="https://msdn.microsoft.com/library/windows/hardware/dn915490">LogPath</a></li>
 	<li>Microsoft-Windows-Setup/<a href="https://msdn.microsoft.com/library/windows/hardware/dn915671">PageFile</a></li>
 	<li>Microsoft-Windows-Setup/<a href="https://msdn.microsoft.com/library/windows/hardware/dn915783">Restart</a></li>
 	<li>Microsoft-Windows-Setup/<a href="https://msdn.microsoft.com/library/windows/hardware/dn915800">RunAsynchronous</a></li>
 	<li>Microsoft-Windows-Setup/<a href="https://msdn.microsoft.com/library/windows/hardware/dn915804">RunSynchronous</a></li>
</ul>
4. The Powershell Script below performs a few simple checks before running.
<ol>
 	<li>Checks WMI to ensure this only runs on the correct model.</li>
 	<li>Check the BIOS for the current Thunderbolt Security Setting, changes it if incorrect and then stops the task Sequence engine in order to reboot the system for the change to take effect.</li>
 	<li>If the correct model and thunderbolt setting are detected it proceeds with the task sequence (Yes I will get around to adding logging)</li>
</ol>
if ($(Get-WmiObject -Namespace "root/cimv2" -Class "win32_computersystem").model -match "HP Elite x2 1012 G1")

{

$result = cmd /c BiosConfigUtility64.exe /getvalue:"Thunderbolt Security Level"

$resultxml =[xml] $result

$wmithunbolt = $resultxml.biosconfig.setting.value.Innertext

if($wmithunbolt -notmatch "\*PCIe and DisplayPort - No Security,PCIe and DisplayPort - User Authorization,PCIe and DisplayPort - Secure Connect,DisplayPort only")

{

CMD /c "x:\hp\biosconfigutility64.exe /setvalue:`"Thunderbolt Security Level`",`"PCIe and DisplayPort - No Security`""

stop-process -name "tsmboot*"

}

}

<strong>Note:</strong> Few things that gave us grief was that when WinPE loads, WMI is available but non Microsoft created ("root\HP\InstrumentedBIOS") classes throw error code (0x8004100E) in Powershell and vbscript, This resulted in us using the BiosConfigUtility64.exe /getvalue to get around the problem.  Also the HP Support package SP75214.exe was adding to the Boot image as Driver pack. Thanks Victor and John M!

As you can see this provides a great way to let WinPE perform some pre-build automation right when it initializes. This could easily be modified to change the bios to UEFI in preparation for Windows 10, taking advantage of the new security features.

<strong>Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the </strong><a href="https://www.microsoft.com/info/cpyright.mspx"><strong>Terms of Use</strong></a>

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Synchronize from an upstream data source location (URL)</title>
      <link>https://docs.microsoft.com/archive/blogs/paul_hadad_blog/synchronize-from-an-upstream-data-source-location-url</link>
      <pubDate>Thu, 11 Apr 2013 13:26:59 GMT</pubDate>
      <dc:creator><![CDATA[Paul_CM]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/paul_hadad_blog/2013/04/11/synchronize-from-an-upstream-data-source-location-url/</guid>
      <description><![CDATA[Most of the time the top-level site in a hierarchy is configured to synchronize software updates...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: small;">Most of the time the top-level site in a hierarchy is configured to synchronize software updates metadata with Microsoft Update. Some company&rsquo;s corporate security policies don&rsquo;t allow access to the Internet from the top-level site. Now with System Center Configuration Manager 2012 SP1 it is possible to configure the synchronization source for the top-level site to use an existing WSUS server that is not in your Configuration Manager hierarchy. &nbsp;In the Software Update Point Component properties you now have the option to synchronize from an upstream data source location (URL)</span></p>
<p><a href="https://technet.microsoft.com/en-us/library/gg712696.aspx#BKMK_WSUSSyncSource"><span style="color: #0563c1; font-size: small;">https://technet.microsoft.com/en-us/library/gg712696.aspx#BKMK_WSUSSyncSource</span></a></p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/38/6746.blog.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-38/6746.blog.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/38/6746.blog.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-38/6746.blog.jpg" alt="" border="0" /></a></p>
<p><span style="font-size: small;">The synchronization takes care of the patch catalog but what about the updates I need to create my patch bundles? If you configure the Upstream WSUS server as a patch repository you will have an alternative download location but still keep the Top level ConfigMgr 2012 SP1 Server not directly&nbsp;connected to the Internet. It is important to make sure that the upstream WSUS Server is configured with matching patch levels and synchronization option with the Software Update point to avoid headaches. </span></p>
<p><span style="font-family: Times New Roman; font-size: small;">&nbsp;</span></p>
<p><span style="font-size: small;"><em><strong>Populate the WSUSCONTENT folder with Express Installation files.</strong></em></span></p>
<p><span style="font-size: small;">On the Upstream WSUS standalone server selecting the option to download the express installation files will allow some time for the update binary downloads to take place. It will populate the WSUSCONTENT folder with all the express installation files based on the products and classifications that you have selected. This option doesn&rsquo;t require you to approve updates. For my test I only selected the categories that I required and the server downloaded 200 GB of express installation files. You'll notice when you set up a software update group and select updates to add to your bundle you are only prompted with&nbsp;the options to download from the Internet or a network location.</span></p>
<ul>
<li><span style="font-size: small;">Create a New Software Update group on the top level ConfigMgr server.</span></li>
<li><span style="font-size: small;">Select browse and enter in the UNC path to the WSUSCONTENT folder on the upstream Standalone WSUS Server. It will grab all the updates you selected and move them to your deployment package source.</span></li>
</ul>
<p><span style="font-size: small;">This option provides another layer of security and should allow an administrator to work on other tasks other than downloading security updates. </span></p>
<p><span style="font-family: Times New Roman; font-size: small;">&nbsp;</span></p>
<p><span style="font-family: Times New Roman; font-size: small;">&nbsp;</span></p>
<p><span style="font-family: Times New Roman; font-size: small;">&nbsp;</span></p>]]></content:encoded>
    </item>
  </channel>
</rss>