<?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>Rui Freitas’s Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/ruif/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/ruif/feed.xml</link>
    <description>The only way of discovering the limits of the possible is to venture a little way past them into the impossible. [Arthur C. Clarke]</description>
    <lastBuildDate>Wed, 17 Apr 2019 04:09:32 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Installing Nano Server on a MinnowBoard Max (at scale)</title>
      <link>https://docs.microsoft.com/archive/blogs/ruif/installing-nano-server-on-a-minnowboard-max-at-scale</link>
      <pubDate>Thu, 18 Aug 2016 14:03:38 GMT</pubDate>
      <dc:creator><![CDATA[Rui Freitas [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/ruif/?p=25</guid>
      <description><![CDATA[The MinnowBoard MAX is an open hardware embedded board with a relatively powerful 64-bit Intel Atom...]]></description>
      <content:encoded><![CDATA[<img width="300" height="221" class="size-medium wp-image-95 alignright" alt="MinnowBoard" src="https://msdnshared.blob.core.windows.net/media/2016/07/MinnowBoardMAX-A2-angled-top-300x221.png" /> The MinnowBoard MAX is an open hardware embedded board with a relatively powerful 64-bit Intel Atom E38XX series System on a Chip at its core. This board has an enormous range of capabilities for hardware and software developers, it makes it a great platform for Nano Server in IoT.

Here I will deploy the Nano Server installation option of Windows Server 2016 on an embedded, non-removable SD Card. This solution offers the similar base functionality and capabilities of SATA, SAS, or NVMe – while being cost effective and offering adequate performance.

The PowerShell commands below can be integrated into a script and placed in a Windows PE to automate the deployment of Nano Server, either repeatedly on the same device or at scale in an unlimited number of devices. The same steps apply when deploying on traditional servers.

For more details about the MinnowBoard visit <a href="https://wiki.minnowboard.org" title="https://wiki.minnowboard.org">https://wiki.minnowboard.org</a>

&nbsp;
<h4><strong>What you will need</strong></h4>
<h5><strong>Hardware list</strong></h5>
<p style="padding-left: 30px">MinnowBoard Max, 2Gb Memory version preferred
5V power supply
SD Card, UHS Speed Class I or II preferred
Peripherals: Micro HDMI cable and Monitor, USB Keyboard, Network Cable
Optional: USB Flash Drive, 8Gb, USB 3.0 or a Windows Deployment Services Server to boot a PowerShell enabled Windows PE</p>
&nbsp;
<h5><strong>Software list</strong></h5>
<p style="padding-left: 30px">MinnowBoard Max latest x64 firmware
<a href="https://firmware.intel.com/projects/minnowboard-max">https://firmware.intel.com/projects/minnowboard-max</a>, Visit <a href="https://wiki.minnowboard.org/UEFI">https://wiki.minnowboard.org/UEFI</a> for how to navigate the firmware</p>
<p style="padding-left: 30px">Windows Server 2016 ISO file (latest build available)
<a href="https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-technical-preview">https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-technical-preview</a></p>
<p style="padding-left: 30px">Windows 10 ADK
<a href="https://go.microsoft.com/fwlink/p/?LinkId=526740">https://go.microsoft.com/fwlink/p/?LinkId=526740</a></p>
<p style="padding-left: 30px">Intel Drivers for MinnowBoard Max, download each of the Driver packages and extract the CAB files to individual folders
<a href="https://catalog.update.microsoft.com/v7/site/ScopedViewInline.aspx?updateid=b454eb7e-0105-408d-a83f-75d450d5797a">https://catalog.update.microsoft.com/v7/site/ScopedViewInline.aspx?updateid=b454eb7e-0105-408d-a83f-75d450d5797a</a>
<a href="https://catalog.update.microsoft.com/v7/site/ScopedViewInline.aspx?updateid=e5234c03-6635-4171-bd63-8ab461bd1e2a">https://catalog.update.microsoft.com/v7/site/ScopedViewInline.aspx?updateid=e5234c03-6635-4171-bd63-8ab461bd1e2a</a>
<a href="https://catalog.update.microsoft.com/v7/site/ScopedViewInline.aspx?updateid=b54a9960-677e-49eb-b6dc-d36e0a32b14b">https://catalog.update.microsoft.com/v7/site/ScopedViewInline.aspx?updateid=b54a9960-677e-49eb-b6dc-d36e0a32b14b</a>
<a href="https://catalog.update.microsoft.com/v7/site/ScopedViewInline.aspx?updateid=e1d3835c-4fe4-4ce7-9d11-d6822bfafefa">https://catalog.update.microsoft.com/v7/site/ScopedViewInline.aspx?updateid=e1d3835c-4fe4-4ce7-9d11-d6822bfafefa</a>
<a href="https://catalog.update.microsoft.com/v7/site/ScopedViewInline.aspx?updateid=63b26746-3daf-45f5-8611-4bcb3b9fe17e">https://catalog.update.microsoft.com/v7/site/ScopedViewInline.aspx?updateid=63b26746-3daf-45f5-8611-4bcb3b9fe17e</a> (Opt. A/V)
you can also get the drivers from Intel, make sure the files are not in MSI format.</p>
<p style="padding-left: 30px">Custom Nano Server answer file, create an unattend.xml file on the nanoserver folder with the following XML content</p>

<pre>&lt;?xml version='1.0' encoding='utf-8'?&gt;  
&lt;unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="https://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"&gt;  
  &lt;settings pass="offlineServicing"&gt;  
    &lt;component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"&gt;  
        &lt;OfflineIdentification&gt;                
           &lt;Provisioning&gt;    
             &lt;AccountData&gt;&lt;/AccountData&gt;  
           &lt;/Provisioning&gt;    
         &lt;/OfflineIdentification&gt;    
    &lt;/component&gt;  
  &lt;/settings&gt;  
  &lt;settings pass="oobeSystem"&gt;  
    &lt;component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"&gt;  
        &lt;UserAccounts&gt;
          &lt;AdministratorPassword&gt;
              &lt;Value&gt;Pass@word1&lt;/Value&gt;
              &lt;PlainText&gt;True&lt;/PlainText&gt;
          &lt;/AdministratorPassword&gt;
        &lt;/UserAccounts&gt;
        &lt;TimeZone&gt;Pacific Standard Time&lt;/TimeZone&gt;  
    &lt;/component&gt;  
  &lt;/settings&gt;  
&lt;/unattend&gt;
</pre>
&nbsp;
<h5><strong>Environment</strong></h5>
<p style="padding-left: 30px">To complete the steps described here, you should be familiar with SMB File Server, Active Directory, DHCP, Windows Deployment Services, Windows Pre-Installation Environment and Powershell.
In my example here I will be joining the Nano Servers to Active Directory domain, you will need one, a DNS and DHCP.
The actual installation will be done from a Windows PE, you can either use a USB flash drive or use a Windows Deployment Services server to boot WinPE over PXE. This WinPE will need to have PowerShell enabled, follow the steps <a href="https://blogs.technet.microsoft.com/ruif/2016/07/12/building-of-a-powershell-enabled-winpe-for-uefi-native-boot/">here </a>or any similar guide you prefer. Configure the WDS and load this WinPE into the boot images.
Create a shared folder on a Server where you will have the files. In my example, I will use the WDS server with a SMB share (DeployShare) with Nanoserver, Blobs and Drivers folders. Copy the content of the NanoServer folder from the Windows Server 2016 ISO, place the extracted drivers in the drivers folder, the Blobs folders will be used to place the generated AD blobs.</p>
&nbsp;
<h4><strong>Update the MinnowBoard Max Firmware and configure</strong></h4>
Connect the MinnowBoard to the monitor, the USB Keyboard to the upper white USB port, the Ethernet cable and as last the power connector.
To boot and run Nano Server we need a 64-bit UEFI firmware. It is highly probable that your MinnowBoard has a 32-bit UEFI firmware. Follow the instructions on the Wiki to identify which one is installed in you board. You will need to know it to run the correct version of the firmware update utility.
To update the firmware, follow the instructions on the Intel MinnowBoard MAX Binary Usage Release Notes.
Power off the board and insert the SD Card. The card will need to be set as non-removable for Windows to be able to boot from it. For that, power on the board and press F2 during POST and in the menu select (type exit if you got to the UEFI shell)
<p style="padding-left: 30px"><strong>Device manager &gt;&gt; System Setup &gt;&gt; South Cluster Configuration &gt;&gt; LPSS &amp; SCC Configuration !! ACPI Reporting MMC/SD Media As &lt;Non-Removable&gt; !!</strong></p>
Setup any other parameter you may need, like Intel VT. On boot manager set the first boot options to EFI Misc Device and the second to PXE over IPv4. Save the configuration and restart, the MinnowBoard should be booting to WinPE from the WDS Server.
<h4></h4>&nbsp;
<h4><strong>Install Nano Server</strong></h4>
The first step once WinPE start is to define some parameters that I will use throughout the deployment process.
I will need an account with permissions to create new AD computer accounts and also access the file share where I have my files. I will also define a server that I will use to generate the AD blob for my Nano server machine account, what packages to install on my Nano Server and the network location where I can find those files.
<pre><span style="color: #ff4500;font-family: Lucida Console">$user</span><span style="font-family: Lucida Console"> </span><span style="color: #a9a9a9;font-family: Lucida Console">=</span><span style="font-family: Lucida Console"> </span><span style="color: #8b0000;font-family: Lucida Console">'administrator'</span>
<span style="color: #ff4500;font-family: Lucida Console">$domain</span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">=</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">'ws2012r2domain'</span></span></span>
<span style="color: #ff4500;font-family: Lucida Console">$password</span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">=</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">ConvertTo-SecureString</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-String</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">'Pass@word1'</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-AsPlainText</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Force</span></span></span>
<span style="color: #ff4500;font-family: Lucida Console">$cred</span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">=</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">New-Object</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-TypeName</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">System.Management.Automation.PSCredential</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-ArgumentList</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$domain</span></span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">'\'</span></span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$user</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">,</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$password</span></span></span>
<span style="color: #ff4500;font-family: Lucida Console">$BlobSvr</span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">=</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">'ws2016wds'</span></span></span>
<span style="color: #ff4500;font-family: Lucida Console">$DShare</span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">=</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">'\\'</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">+</span></span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$BlobSvr</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">+</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">'\DeployShare'</span></span></span>
<span style="color: #ff4500;font-family: Lucida Console">$Packages</span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">=</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">'NanoServer-Compute'</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">,</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">'NanoServer-DCB'</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">,</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">'NanoServer-Defender'</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">,</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">'NanoServer-DSC'</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">,</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">'NanoServer-FailoverCluster'</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">,</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">'NanoServer-Host'</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">,</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">'NanoServer-OEM-Drivers'</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">,</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">'NanoServer-SecureStartup'</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">,</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">'NanoServer-Storage'</span></span></span>
<span style="color: #006400;font-family: Lucida Console">### other Packages ###'NanoServer-Containers','NanoServer-DNS','NanoServer-Guest','NanoServer-IIS','NanoServer-SCVMM','NanoServer-ShieldedVM','NanoServer-SoftwareInventoryLogging' </span>
</pre>
&nbsp;
Specific to my hardware configuration, my network takes a few seconds to come online. I added this loop to wait for the network to be ready by testing the connection against my WDS server.
<pre><span style="color: #00008b;font-family: Lucida Console">while</span><span style="font-family: Lucida Console"> ((</span><span style="color: #0000ff;font-family: Lucida Console">Test-Connection</span><span style="font-family: Lucida Console"> </span><span style="color: #000080;font-family: Lucida Console">-ComputerName</span><span style="font-family: Lucida Console"> </span><span style="color: #ff4500;font-family: Lucida Console">$BlobSvr</span><span style="font-family: Lucida Console"> </span><span style="color: #000080;font-family: Lucida Console">-Count</span><span style="font-family: Lucida Console"> </span><span style="color: #800080;font-family: Lucida Console">1</span><span style="font-family: Lucida Console"> </span><span style="color: #000080;font-family: Lucida Console">-Quiet</span><span style="font-family: Lucida Console">) </span><span style="color: #a9a9a9;font-family: Lucida Console">-ne</span><span style="font-family: Lucida Console"> </span><span style="color: #8b0000;font-family: Lucida Console">'true'</span><span style="font-family: Lucida Console">)</span>
    {
<span style="font-family: Lucida Console"><span style="font-family: Lucida Console">    </span></span><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Write-Host</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">"Waiting for network ..."</span></span></span>
<span style="font-family: Lucida Console"><span style="font-family: Lucida Console">    </span></span><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">sleep</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Seconds</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #800080;font-family: Lucida Console"><span style="color: #800080;font-family: Lucida Console"><span style="color: #800080;font-family: Lucida Console">2</span></span></span>
    }
</pre>
&nbsp;
Next I map a network drive to the WDS server, It will not be using the mapped drive, but it will help maintain an authenticated SMB session with the server.
<pre><span style="color: #0000ff;font-family: Lucida Console">New-PSDrive</span><span style="font-family: Lucida Console"> </span><span style="color: #000080;font-family: Lucida Console">-Name</span><span style="font-family: Lucida Console"> </span><span style="color: #8b0000;font-family: Lucida Console">"Y"</span><span style="font-family: Lucida Console"> </span><span style="color: #000080;font-family: Lucida Console">-Root</span><span style="font-family: Lucida Console"> </span><span style="color: #ff4500;font-family: Lucida Console">$DShare</span><span style="font-family: Lucida Console"> </span><span style="color: #000080;font-family: Lucida Console">-PSProvider</span><span style="font-family: Lucida Console"> </span><span style="color: #8b0000;font-family: Lucida Console">"FileSystem"</span><span style="font-family: Lucida Console"> </span><span style="color: #000080;font-family: Lucida Console">-Credential</span><span style="font-family: Lucida Console"> </span><span style="color: #ff4500;font-family: Lucida Console">$cred </span>
</pre>
&nbsp;
Now is were the fun part begins. We will need a name for the Nano server to provision the Active Directory account and create a blob used to join the server to the Domain during first boot. In my example I will be using the NIC MAC address (for being unique) and will add a prefix to identify it as the Host OS.
The next set of commands read the MAC address and manipulate the string to a valid ComputerName and then connect to the domain joined WDS server to generate the AD blob. The AD blob is saved to a folder on the share.
<pre><span style="color: #a9a9a9;font-family: Lucida Console">[</span><span style="color: #008080;font-family: Lucida Console">string</span><span style="color: #a9a9a9;font-family: Lucida Console">]</span><span style="color: #ff4500;font-family: Lucida Console">$mac</span><span style="font-family: Lucida Console"> </span><span style="color: #a9a9a9;font-family: Lucida Console">=</span><span style="font-family: Lucida Console"> (</span><span style="color: #0000ff;font-family: Lucida Console">Get-WmiObject</span><span style="font-family: Lucida Console"> </span><span style="color: #000080;font-family: Lucida Console">-Class</span><span style="font-family: Lucida Console"> </span><span style="color: #8a2be2;font-family: Lucida Console">win32_networkadapter</span><span style="font-family: Lucida Console">)</span><span style="color: #a9a9a9;font-family: Lucida Console">.</span><span style="font-family: Lucida Console">macaddress</span>
<span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$Computername</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">=</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">"HST"</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">+</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$mac</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">.</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">TrimStart()</span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">.</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">Replace(</span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">":"</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">,</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">""</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">)</span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">.</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">Substring(</span></span><span style="color: #800080;font-family: Lucida Console"><span style="color: #800080;font-family: Lucida Console"><span style="color: #800080;font-family: Lucida Console">0</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">,</span></span></span><span style="color: #800080;font-family: Lucida Console"><span style="color: #800080;font-family: Lucida Console"><span style="color: #800080;font-family: Lucida Console">12</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">)</span></span>

<span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$DJoin</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">=</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">"C:\windows\system32\djoin.exe /provision /reuse /domain </span></span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$domain</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"> /machine </span></span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$Computername</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"> /savefile </span></span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$DShare</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">\blobs\</span></span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$Computername</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">.blob"</span></span></span>
<span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$GetBlob</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">=</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Invoke-WmiMethod</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Class</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">win32_process</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Name</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">create</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-ArgumentList</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$DJoin</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-ComputerName</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$BlobSvr</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Credential</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$cred</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Impersonation</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">Delegate</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Authority</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">kerberos:</span></span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$domain</span></span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">'\'</span></span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$BlobSvr</span></span></span>
</pre>
<h6>It is good to perform these first, if it fails there is no point in continuing.</h6>
&nbsp;
Next step is to identify the SD Card disk, clean it and create the system partitions
<pre><span style="color: #ff4500;font-family: Lucida Console">$PDisk</span><span style="font-family: Lucida Console"> </span><span style="color: #a9a9a9;font-family: Lucida Console">=</span><span style="font-family: Lucida Console"> </span><span style="color: #0000ff;font-family: Lucida Console">Get-PhysicalDisk</span><span style="font-family: Lucida Console"> </span><span style="color: #a9a9a9;font-family: Lucida Console">|</span><span style="color: #0000ff;font-family: Lucida Console">?</span><span style="font-family: Lucida Console"> </span><span style="color: #8a2be2;font-family: Lucida Console">BusType</span><span style="font-family: Lucida Console"> </span><span style="color: #000080;font-family: Lucida Console">-EQ</span><span style="font-family: Lucida Console"> </span><span style="color: #8a2be2;font-family: Lucida Console">SD</span><span style="font-family: Lucida Console"> </span><span style="color: #a9a9a9;font-family: Lucida Console">|</span><span style="color: #0000ff;font-family: Lucida Console">Get-Disk</span>
<span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$PDisk</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">|</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Clear-Disk</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-RemoveData</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-RemoveOEM</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Confirm:</span></span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$false</span></span></span>
<span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$PDisk</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">|</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Initialize-Disk</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-PartitionStyle</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">GPT</span></span></span>
 
<span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">New-Partition</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-DiskNumber</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$PDisk</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">.</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">Number </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Size</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #800080;font-family: Lucida Console"><span style="color: #800080;font-family: Lucida Console"><span style="color: #800080;font-family: Lucida Console">128Mb</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-DriveLetter</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">S</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-GptType</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">"{ebd0a0a2-b9e5-4433-87c0-68b6b72699c7}"</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">|</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Format-Volume</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-FileSystem</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">FAT32</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-NewFileSystemLabel</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">System</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span>
<span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">New-Partition</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-DiskNumber</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$PDisk</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">.</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">Number </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-UseMaximumSize</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-DriveLetter</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">W</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-GptType</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">"{ebd0a0a2-b9e5-4433-87c0-68b6b72699c7}"</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">|</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Format-Volume</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-FileSystem</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">NTFS</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-NewFileSystemLabel</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">Windows</span></span></span>
</pre>
&nbsp;
With the partitions created it is time to apply the base Nano image and the Nano packages. WIM index 1 is Standard Edition and index 2 datacenter, the packages are identified as an array of strings defined earlier, modify these as needed. Other Windows features can also be enabled offline at this point.
<pre><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Expand-WindowsImage</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-ImagePath</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">"</span></span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$DShare</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">\NanoServer\NanoServer.wim"</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Index</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #800080;font-family: Lucida Console"><span style="color: #800080;font-family: Lucida Console"><span style="color: #800080;font-family: Lucida Console">2</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-ApplyPath</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">W:\</span></span></span>

<span style="color: #00008b;font-family: Lucida Console">ForEach</span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">(</span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$Package</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #00008b;font-family: Lucida Console"><span style="color: #00008b;font-family: Lucida Console"><span style="color: #00008b;font-family: Lucida Console">in</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$Packages</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">)</span></span>
	{
<span style="color: #ff4500;font-family: Lucida Console">	$Cabs</span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">=</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Get-ChildItem</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">"</span></span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$DShare</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">\NanoServer\Packages\"</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Recurse</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Include</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">*</span></span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$Package</span></span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">*.cab</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">|</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Sort-Object</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Descending</span></span></span>
<span style="color: #00008b;font-family: Lucida Console">	ForEach</span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> (</span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$Cab</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #00008b;font-family: Lucida Console"><span style="color: #00008b;font-family: Lucida Console"><span style="color: #00008b;font-family: Lucida Console">in</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$Cabs</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">)</span></span>
		{
<span style="color: #0000ff;font-family: Lucida Console">		Add-WindowsPackage</span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Path</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">w:\</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-PackagePath</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$Cab</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">.</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">FullName</span></span>
		}
	}

<span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Enable-WindowsOptionalFeature</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-FeatureName</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">File-Services</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Path</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">W:\ </span></span></span>
</pre>
&nbsp;
Now that the image is applied to the SD card, we need to ensure the Nano Server has all the drivers to boot and operate the Hardware. In the next steps we will use the WinPE drivers for SD Card and USB storage devices and apply them to the image, similarly will apply all the MinnowBoard specific drivers from the drivers folder.
<pre><span style="color: #0000ff;font-family: Lucida Console">Add-WindowsDriver</span><span style="font-family: Lucida Console"> </span><span style="color: #000080;font-family: Lucida Console">-Path</span><span style="font-family: Lucida Console"> </span><span style="color: #8a2be2;font-family: Lucida Console">w:\</span><span style="font-family: Lucida Console"> </span><span style="color: #000080;font-family: Lucida Console">-driver</span><span style="font-family: Lucida Console"> (</span><span style="color: #0000ff;font-family: Lucida Console">Get-Item</span><span style="font-family: Lucida Console"> </span><span style="color: #000080;font-family: Lucida Console">-Path</span><span style="font-family: Lucida Console"> </span><span style="color: #8a2be2;font-family: Lucida Console">X:\Windows\System32\DriverStore\FileRepository\sdstor.inf_amd64_*</span><span style="font-family: Lucida Console">) </span><span style="color: #000080;font-family: Lucida Console">-Recurse</span><span style="font-family: Lucida Console"> </span><span style="color: #000080;font-family: Lucida Console">-Verbose</span>
<span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Add-WindowsDriver</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Path</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">w:\</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-driver</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> (</span></span><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Get-Item</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Path</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">X:\Windows\System32\DriverStore\FileRepository\sdbus.inf_amd64_*</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">) </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Recurse</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Verbose</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Add-WindowsDriver</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Path</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">w:\</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-driver</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> (</span></span><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Get-Item</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Path</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">X:\Windows\System32\DriverStore\FileRepository\usbstor.inf_amd64_*</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">) </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Recurse</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Verbose</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Add-WindowsDriver</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Path</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">w:\</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-driver</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> (</span></span><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Get-Item</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Path</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">X:\Windows\System32\DriverStore\FileRepository\usbhub3.inf_amd64_*</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">) </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Recurse</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Verbose</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Add-WindowsDriver</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Path</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">w:\</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-driver</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> (</span></span><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Get-Item</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Path</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">X:\Windows\System32\DriverStore\FileRepository\usbxhci.inf_amd64_*</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">) </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Recurse</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Verbose</span></span></span>

<span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Add-WindowsDriver</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Path</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">w:\</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Driver</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">"</span></span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$DShare</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">\Drivers\Minnowboard"</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Recurse</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Verbose </span></span></span>
</pre>
&nbsp;
As next step, create the Boot Configuration Database and the boot loader files to the S: partition and set it as a UEFI system partition
<pre><span style="color: #0000ff;font-family: Lucida Console">Invoke-Command</span><span style="font-family: Lucida Console"> </span><span style="color: #000080;font-family: Lucida Console">-ScriptBlock</span><span style="font-family: Lucida Console"> {</span><span style="color: #0000ff;font-family: Lucida Console">Bcdboot</span><span style="font-family: Lucida Console"> </span><span style="color: #8a2be2;font-family: Lucida Console">w:\windows</span><span style="font-family: Lucida Console"> </span><span style="color: #8a2be2;font-family: Lucida Console">/s</span><span style="font-family: Lucida Console"> </span><span style="color: #8a2be2;font-family: Lucida Console">s:</span><span style="font-family: Lucida Console"> </span><span style="color: #8a2be2;font-family: Lucida Console">/f</span><span style="font-family: Lucida Console"> </span><span style="color: #8a2be2;font-family: Lucida Console">UEFI</span><span style="font-family: Lucida Console">} </span>

<span style="color: #0000ff;font-family: Lucida Console">Set-Partition</span><span style="font-family: Lucida Console"> </span><span style="color: #000080;font-family: Lucida Console">-DiskNumber</span><span style="font-family: Lucida Console"> </span><span style="color: #ff4500;font-family: Lucida Console">$PDisk</span><span style="color: #a9a9a9;font-family: Lucida Console">.</span><span style="font-family: Lucida Console">DiskNumber </span><span style="color: #000080;font-family: Lucida Console">-PartitionNumber</span><span style="font-family: Lucida Console"> </span><span style="color: #800080;font-family: Lucida Console">1</span><span style="font-family: Lucida Console"> </span><span style="color: #000080;font-family: Lucida Console">-GptType</span><span style="font-family: Lucida Console"> </span><span style="color: #8b0000;font-family: Lucida Console">"{c12a7328-f81f-11d2-ba4b-00a0c93ec93b}"</span><span style="font-family: Lucida Console"> </span>
</pre>
&nbsp;
The last step is to read the AD blob created previously, place it it in the unattend.xml file and apply the unattended to the image. During the first boot this blob will be read and the Nano server will join the domain without requiring user input.
<pre><span style="color: #ff4500;font-family: Lucida Console">$unattendxml</span><span style="font-family: Lucida Console"> </span><span style="color: #a9a9a9;font-family: Lucida Console">=</span><span style="font-family: Lucida Console"> </span><span style="color: #a9a9a9;font-family: Lucida Console">[</span><span style="color: #008080;font-family: Lucida Console">xml</span><span style="color: #a9a9a9;font-family: Lucida Console">]</span><span style="font-family: Lucida Console">(</span><span style="color: #0000ff;font-family: Lucida Console">Get-Content</span><span style="font-family: Lucida Console"> </span><span style="color: #8b0000;font-family: Lucida Console">"</span><span style="color: #ff4500;font-family: Lucida Console">$DShare</span><span style="color: #8b0000;font-family: Lucida Console">\nanoserver\unattend.xml"</span><span style="font-family: Lucida Console">)</span>
<span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$blob</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">=</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> (</span></span><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Get-Content</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Encoding</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">ASCII</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Path</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">"</span></span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$DShare</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">\blobs\</span></span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$Computername</span></span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">.blob"</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">)</span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">.</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">ToString()</span></span>
<span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$blob</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">=</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$blob</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">.</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">Substring(</span></span><span style="color: #800080;font-family: Lucida Console"><span style="color: #800080;font-family: Lucida Console"><span style="color: #800080;font-family: Lucida Console">0</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">,</span></span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$blob</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">.</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">Length </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">-</span></span></span><span style="color: #800080;font-family: Lucida Console"><span style="color: #800080;font-family: Lucida Console"><span style="color: #800080;font-family: Lucida Console">1</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">)</span></span>
<span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$unattendxml</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">.</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">unattend</span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">.</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">settings</span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">[</span></span></span><span style="color: #800080;font-family: Lucida Console"><span style="color: #800080;font-family: Lucida Console"><span style="color: #800080;font-family: Lucida Console">0</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">].</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">component</span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">.</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">OfflineIdentification</span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">.</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">Provisioning</span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">.</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">AccountData </span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">=</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$blob</span></span></span>
<span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console"><span style="color: #ff4500;font-family: Lucida Console">$unattendxml</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console"><span style="color: #a9a9a9;font-family: Lucida Console">.</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">Save(</span></span><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console"><span style="color: #8b0000;font-family: Lucida Console">'X:\unattend.xml'</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console">)</span></span>

<span style="color: #0000ff;font-family: Lucida Console">Apply-WindowsUnattend</span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Path</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">W:\</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-UnattendPath</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">X:\unattend.xml</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">New-Item</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Path</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">W:\Windows\Panther</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-ItemType</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">Directory</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Force</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console"><span style="color: #0000ff;font-family: Lucida Console">Copy-Item</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Path</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">X:\unattend.xml</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Destination</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console"><span style="color: #8a2be2;font-family: Lucida Console">W:\Windows\Panther\</span></span></span><span style="font-family: Lucida Console"><span style="font-family: Lucida Console"> </span></span><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console"><span style="color: #000080;font-family: Lucida Console">-Force </span></span></span>
</pre>
&nbsp;
And this will be all, once you reboot ensure the boot order has the UEFI Misc Device as first. Windows will create a new entry for the Windows Boot Manager to keep the BCD and the firmware info synchronized.

You can use the local recovery console and/or PowerShell remote to configure and manage your ano Servers.

&nbsp;

&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Building a PowerShell enabled WinPE for UEFI native boot</title>
      <link>https://docs.microsoft.com/archive/blogs/ruif/building-of-a-powershell-enabled-winpe-for-uefi-native-boot</link>
      <pubDate>Tue, 12 Jul 2016 13:29:51 GMT</pubDate>
      <dc:creator><![CDATA[Rui Freitas [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/ruif/?p=105</guid>
      <description><![CDATA[Summary: The Windows Preinstallation Environment (WinPE) is a small operating system used to...]]></description>
      <content:encoded><![CDATA[<strong>Summary:</strong> The Windows Preinstallation Environment (WinPE) is a small operating system used to install, deploy, and repair  many editions of Windows. The baseline WinPE is on its own a very powerful tool, but it is when you enable PowerShell that it reveals the full potential. In my instructions below make it very simple to create a custom WinPE 64 bit for UEFI native boot using a USB Flash Drive.

&nbsp;

Before you start, you will need to install the most recent Windows Assessment and Deployment Kit (Windows ADK), on the computer you are going to use to create the WinPE USB. Get the Windows ADK from the <a href="https://developer.microsoft.com/en-us/windows/hardware/windows-assessment-deployment-kit">Hardware Dev Center </a>or the latest build from <a href="https://connect.microsoft.com/site1304">Connect</a>.

You will also need a USB flash drive that can be completely cleaned. The capacity will depend of the size and how many Windows images, drivers and tools you will keep in the drive, and whenever possible use USB 3.0 for increased performance.

&nbsp;

Once the Windows ADK is installed, start a PowerShell CLI or ISE.

The first step is to create two variables with Path to the WinPE files in the ADK and to a temporary folder were we will customize the WinPE and USB flash drive content.
<pre><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinADK</span><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">=</span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">”C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64”</span>
<span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPETemp</span><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">=</span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">’C:\WinPETemp’ </span></pre>
&nbsp;

Next is to create the file structure in the temporary folder and copy the minimum required files from the ADK. This includes the EFI folder with the Windows Boot Manager, the Boot folder with the Boot Configuration Data Store, and the actual WinPE image to the Sources folder. The mount folder will be used to mount the WinPE image file.
<pre><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">New-Item</span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small">-ItemType</span> <span style="color: #8a2be2;font-family: Lucida Console;font-size: x-small">Directory</span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPETemp</span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\PEDrive\Sources”</span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Force</span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Copy-Item</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\en-us\winpe.wim”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Destination</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPETemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\PEDrive\Sources\boot.wim”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Force</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Copy-Item</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Media\Boot”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Destination</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPETemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\PEDrive\”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Recurse</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Copy-Item</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Media\EFI”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Destination</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPETemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\PEDrive\”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Recurse</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">New-Item</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-ItemType</span></span></span> <span style="color: #8a2be2;font-family: Lucida Console;font-size: x-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: x-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: x-small">Directory</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPETemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">–Force </span></span></span>
</pre>
&nbsp;

With all the files in place, the next step is to mount and add the WinPE packages to the base WinPE image. The next set of commands will mount the image and add these from the ADK.
<pre><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Mount-WindowsImage</span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small">-ImagePath</span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPETemp</span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\PEDrive\Sources\boot.wim”</span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Index</span> <span style="color: #800080;font-family: Lucida Console;font-size: x-small">1</span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small">–path</span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPETemp</span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Add-WindowsPackage</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PackagePath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Winpe_OCS\WinPE-WMI.cab”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPeTemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">–IgnoreCheck</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Add-WindowsPackage</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PackagePath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Winpe_OCS\en-us\WinPE-WMI_en-us.cab”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPeTemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-IgnoreCheck</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Add-WindowsPackage</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PackagePath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Winpe_OCS\WinPE-WMI.cab”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPeTemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">–IgnoreCheck</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Add-WindowsPackage</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PackagePath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Winpe_OCS\en-us\WinPE-WMI_en-us.cab”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPeTemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">–IgnoreCheck</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Add-WindowsPackage</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PackagePath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Winpe_OCS\WinPE-NetFx.cab”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPeTemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">–IgnoreCheck</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Add-WindowsPackage</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PackagePath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Winpe_OCS\en-us\WinPE-NetFx_en-us.cab”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPeTemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">–IgnoreCheck</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Add-WindowsPackage</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PackagePath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Winpe_OCS\WinPE-Scripting.cab”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPeTemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">–IgnoreCheck</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Add-WindowsPackage</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PackagePath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Winpe_OCS\en-us\WinPE-Scripting_en-us.cab”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPeTemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">–IgnoreCheck</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Add-WindowsPackage</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PackagePath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Winpe_OCS\WinPE-PowerShell.cab”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPeTemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">–IgnoreCheck</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Add-WindowsPackage</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PackagePath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Winpe_OCS\en-us\WinPE-PowerShell_en-us.cab”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPeTemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">–IgnoreCheck</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Add-WindowsPackage</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PackagePath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Winpe_OCS\WinPE-DismCmdlets.cab”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPeTemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">–IgnoreCheck</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Add-WindowsPackage</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PackagePath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Winpe_OCS\en-us\WinPE-DismCmdlets_en-us.cab”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPeTemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">–IgnoreCheck</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Add-WindowsPackage</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PackagePath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Winpe_OCS\WinPE-EnhancedStorage.cab”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPeTemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">–IgnoreCheck</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Add-WindowsPackage</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PackagePath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Winpe_OCS\en-us\WinPE-EnhancedStorage_en-us.cab”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPeTemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">–IgnoreCheck</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Add-WindowsPackage</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PackagePath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Winpe_OCS\WinPE-StorageWMI.cab”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPeTemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">–IgnoreCheck</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Add-WindowsPackage</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PackagePath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinAdk</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Winpe_OCS\en-us\WinPE-StorageWMI_en-us.cab”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPeTemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">–IgnoreCheck</span></span></span>
</pre>
&nbsp;

This point is the best time to customize the WinPE image that will be loaded to the RAM drive, also known as the X:\ drive. In this example I will just make two simple customizations; add PowerShell CLI to auto start and set the PowerShell execution policy to unrestricted so I can run my unsigned PowerShell scripts without the need to modify the policy on every WinPE boot.
<pre><span style="color: #006400;font-family: Lucida Console;font-size: xx-small">### Add powershell CLI to startnet.cmd</span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: xx-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: xx-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: xx-small">Add-Content</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: xx-small"><span style="color: #000080;font-family: Lucida Console;font-size: xx-small"><span style="color: #000080;font-family: Lucida Console;font-size: xx-small">-Path</span></span></span> <span style="color: #ff4500;font-family: Lucida Console;font-size: xx-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: xx-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: xx-small">$WinPeTemp</span></span></span><span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small">\Mount\Windows\system32\startnet.cmd</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: xx-small"><span style="color: #000080;font-family: Lucida Console;font-size: xx-small"><span style="color: #000080;font-family: Lucida Console;font-size: xx-small">-Value</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: xx-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: xx-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: xx-small">'start /MAX PowerShell'
</span></span></span>
<span style="color: #006400;font-family: Lucida Console;font-size: xx-small">### Set powershell script execution policy to unrestricted</span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: xx-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: xx-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: xx-small">Reg.exe</span></span></span> <span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small">load</span></span></span> <span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small">hklm\TempHive</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: xx-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: xx-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: xx-small">"</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: xx-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: xx-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: xx-small">$WinPeTemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: xx-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: xx-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: xx-small">\Mount\Windows\system32\Config\SOFTWARE"</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: xx-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: xx-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: xx-small">Set-ItemProperty</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: xx-small"><span style="color: #000080;font-family: Lucida Console;font-size: xx-small"><span style="color: #000080;font-family: Lucida Console;font-size: xx-small">-Path</span></span></span> <span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small">HKLM:\TempHive\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: xx-small"><span style="color: #000080;font-family: Lucida Console;font-size: xx-small"><span style="color: #000080;font-family: Lucida Console;font-size: xx-small">-Name</span></span></span> <span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small">ExecutionPolicy</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: xx-small"><span style="color: #000080;font-family: Lucida Console;font-size: xx-small"><span style="color: #000080;font-family: Lucida Console;font-size: xx-small">-Value</span></span></span> <span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small">Unrestricted</span></span></span>
<span style="color: #0000ff;font-family: Lucida Console;font-size: xx-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: xx-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: xx-small">Reg.exe</span></span></span> <span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small">unload</span></span></span> <span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: xx-small">hklm\TempHive </span></span></span>
</pre>
<h6>If you plan to use this WinPE image on a Windows Deployment Services server, it is a good idea to add a line to startnet.cmd to map a network drive, very similar to add the PowerShell CLI but using the NET USE command</h6>
&nbsp;

Once all the customizations are done we just need to dismount the WinPE image and commit all the changes.
<pre><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Dismount-WindowsImage</span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small">-path</span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPETemp</span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Save </span>
</pre>
<h6>Important note here is that the WinPE image cannot exceed 500Mb due to the RAM drive limitations. If you need to access large files keep them in the USB flash drive but outside the WinPE image. in the example here copy them to the PEDrive folder and they will be accessible to WinPE on the USB flash Drive. Another option is to keep your large files in a file share and remote access them from the WinPE</h6>
&nbsp;

As a last step we need to identify the USB Flash Drive, set the partition style to GPT and format it as FAT32. Then copy all the files in the temporary PEDrive folder to the drive. If you will be using WDS this next step is not required as will you only need to import the modified boot.wim in the temporary folder to the boot images in the WDS Server.
<pre><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$Disk</span><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">=</span> <span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Get-Disk</span> <span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">|</span> <span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Where-Object</span><span style="font-family: Lucida Console;font-size: x-small"> { </span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$_</span><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">.</span><span style="font-family: Lucida Console;font-size: x-small">BusType </span><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">–eq</span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">‘USB’</span><span style="font-family: Lucida Console;font-size: x-small"> } </span><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">|</span> <span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Out-Gridview</span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small">–passthru</span>
<span style="color: #00008b;font-family: Lucida Console;font-size: x-small"><span style="color: #00008b;font-family: Lucida Console;font-size: x-small"><span style="color: #00008b;font-family: Lucida Console;font-size: x-small">if</span></span></span><span style="font-family: Lucida Console;font-size: x-small"><span style="font-family: Lucida Console;font-size: x-small"> (</span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$Disk</span></span></span><span style="font-family: Lucida Console;font-size: x-small"><span style="font-family: Lucida Console;font-size: x-small">)</span></span>
<span style="font-family: Lucida Console;font-size: x-small"> { </span>
 <span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Get-Disk</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Number</span></span></span><span style="font-family: Lucida Console;font-size: x-small"><span style="font-family: Lucida Console;font-size: x-small"> (</span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$Disk</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">.</span></span></span><span style="font-family: Lucida Console;font-size: x-small"><span style="font-family: Lucida Console;font-size: x-small">number) </span></span><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">|</span></span></span> <span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Get-Partition</span></span></span> <span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">|</span></span></span> <span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Remove-partition</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-confirm:</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$false</span></span></span>
 <span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Clear-Disk</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Number</span></span></span> <span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$Disk</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">.</span></span></span><span style="font-family: Lucida Console;font-size: x-small"><span style="font-family: Lucida Console;font-size: x-small">Number </span></span><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-RemoveData</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-RemoveOEM</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-confirm:</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$false</span></span></span> <span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">|</span></span></span> <span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Set-Disk</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Number</span></span></span> <span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$Disk</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">.</span></span></span><span style="font-family: Lucida Console;font-size: x-small"><span style="font-family: Lucida Console;font-size: x-small">DiskNumber </span></span><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PartitionStyle</span></span></span> <span style="color: #8a2be2;font-family: Lucida Console;font-size: x-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: x-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: x-small">GPT</span></span></span>
 <span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$Partition</span></span></span> <span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">=</span></span></span> <span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">New-Partition</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-DiskNumber</span></span></span> <span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$Disk</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">.</span></span></span><span style="font-family: Lucida Console;font-size: x-small"><span style="font-family: Lucida Console;font-size: x-small">Number </span></span><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-UseMaximumSize</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-GptType</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">"{ebd0a0a2-b9e5-4433-87c0-68b6b72699c7}"</span></span></span>
 <span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Add-PartitionAccessPath</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-DiskNumber</span></span></span> <span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$Partition</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">.</span></span></span><span style="font-family: Lucida Console;font-size: x-small"><span style="font-family: Lucida Console;font-size: x-small">DiskNumber </span></span><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PartitionNumber</span></span></span> <span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$Partition</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">.</span></span></span><span style="font-family: Lucida Console;font-size: x-small"><span style="font-family: Lucida Console;font-size: x-small">PartitionNumber </span></span><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-AccessPath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPETemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span>
 <span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Format-Volume</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Partition</span></span></span> <span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$Partition</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-FileSystem</span></span></span> <span style="color: #8a2be2;font-family: Lucida Console;font-size: x-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: x-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: x-small">FAT32</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-NewFileSystemLabel</span></span></span> <span style="color: #8a2be2;font-family: Lucida Console;font-size: x-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: x-small"><span style="color: #8a2be2;font-family: Lucida Console;font-size: x-small">PowerPE</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Force</span></span></span>

 <span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Copy-Item</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Path</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">"</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPETemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\PEDrive\*"</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Destination</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">"</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPETemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount"</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Recurse</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-Force</span></span></span>

 <span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small"><span style="color: #0000ff;font-family: Lucida Console;font-size: x-small">Remove-PartitionAccessPath</span></span></span> <span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-DiskNumber</span></span></span> <span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$Partition</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">.</span></span></span><span style="font-family: Lucida Console;font-size: x-small"><span style="font-family: Lucida Console;font-size: x-small">DiskNumber </span></span><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-PartitionNumber</span></span></span> <span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$Partition</span></span></span><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small"><span style="color: #a9a9a9;font-family: Lucida Console;font-size: x-small">.</span></span></span><span style="font-family: Lucida Console;font-size: x-small"><span style="font-family: Lucida Console;font-size: x-small">PartitionNumber </span></span><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small"><span style="color: #000080;font-family: Lucida Console;font-size: x-small">-AccessPath</span></span></span> <span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">“</span></span></span><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small"><span style="color: #ff4500;font-family: Lucida Console;font-size: x-small">$WinPETemp</span></span></span><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small"><span style="color: #8b0000;font-family: Lucida Console;font-size: x-small">\Mount”</span></span></span>
<span style="font-family: Lucida Console;font-size: x-small"> } </span>
</pre>
<h6>The UEFI firmware will look for the bootx64.efi file in the FSx:EFI\boot folder and will be able to boot WinPE without the need of a Master Boot Record.</h6>
&nbsp;

The different system vendors will have different interfaces to boot from the USB drive, but all of them should have that option.]]></content:encoded>
    </item>
  </channel>
</rss>