# About OSDCloud

**OSDCloud** is a Community Tool for deploying Windows 11 (amd64 and arm64) over the internet without using local infrastructure. OSDCloud runs in WinPE using the [**OSDCloud**](https://www.powershellgallery.com/packages/OSDCloud/) or the [**OSD**](https://www.powershellgallery.com/packages/OSD/) PowerShell Modules.

OSDCloud fills a gap for organizations using Intune that still require a solution for bare metal OSD.

<figure><img src="/files/B66AqiZAXqhuUIsqf1up" alt=""><figcaption></figcaption></figure>

## Operating System

Supported versions of Windows 11 (23H2-25H2) for amd64 and arm64 are downloaded directly from Microsoft.

<figure><img src="/files/nClxJh5EfdjQcno65WbF" alt=""><figcaption></figcaption></figure>

## Firmware Updates

Firmware updates are downloaded directly from Microsoft Update Catalog and applied after rebooting from WinPE.

<figure><img src="/files/IJflqqPyOYQb2YF2Lw68" alt=""><figcaption></figcaption></figure>

## Drivers and DriverPacks

Drivers are downloaded directly from Microsoft Update Catalog, and DriverPacks from Dell, HP, Lenovo, and Microsoft Surface are downloaded directly from the OEMs.

<figure><img src="/files/DR9TAGaveYKKcHyFZZNf" alt=""><figcaption></figcaption></figure>

## OOBE Autopilot Ready

Finally, local PowerShell Modules are updated so you can immediately start using your device in OOBE.

<figure><img src="/files/m1PFU7jzOQE1KcDcmQlj" alt=""><figcaption></figcaption></figure>


# OSDCloud Events

<details>

<summary>Expand for past events</summary>

### February 12 - Recast and System Center Dudes Webinar

{% embed url="<https://www.recastsoftware.com/resources/community-tools-intune-mvps-around-globe/>" %}

{% embed url="<https://www.youtube.com/watch?v=-xsI6roZi2A>" %}

### February 20 - Recast Right Click Tools Release Show

{% embed url="<https://www.youtube.com/watch?v=8vsWdH-G5yk>" %}

### March 20 - Recast Right Click Tools Release Show

{% hint style="info" icon="rocket-launch" %}
OSDCloud Monthly Feature Release
{% endhint %}

{% embed url="<https://www.recastsoftware.com/resources/right-click-tools-release-show/>" %}

{% embed url="<https://events.teams.microsoft.com/event/22c21689-55d2-4ec2-a359-ba9f3b95fb7a@9315bb44-6348-46c6-bd37-8880b87e774e>" %}

</details>

### March 27 - Northwest System Center User Group

{% hint style="info" icon="party-horn" %}
OSDCloud Insiders and WinPE Startnet Customizations - David Segura

From Friction to Flow: Enhancing Intune Operations with Recast - Fabian Rodriguez

Intune Suite Explained - Fabian Rodriguez
{% endhint %}

{% embed url="<https://nwscug.org/2026/02/25/nwscug-osdcloud-powershell-and-intune-suite-sponsored-by-recast/>" %}

{% embed url="<https://events.teams.microsoft.com/event/47409957-3abe-4317-9e77-fb4637f8f32f@e8b42f10-b2c3-4062-966e-c2122cf67958>" %}

### April 17 - Recast Right Click Tools Release Show

{% hint style="info" icon="rocket-launch" %}
OSDCloud Monthly Feature Release
{% endhint %}

{% embed url="<https://www.recastsoftware.com/resources/right-click-tools-release-show/>" %}

{% embed url="<https://events.teams.microsoft.com/event/b878461d-1fee-4e06-a7ae-6a1fc1c28aaa@9315bb44-6348-46c6-bd37-8880b87e774e>" %}

### May 4-7 - MMS at MOA Conference

{% embed url="<https://mmsmoa.com/mms2026moa>" %}

{% embed url="<https://mms2026atmoa.sched.com/event/2HHHN>" %}

<details>

<summary>Additional Sessions</summary>

{% embed url="<https://mms2026atmoa.sched.com/event/2HHEW>" %}

{% embed url="<https://mms2026atmoa.sched.com/event/2HHGt/powershell-hot-takes>" %}

{% embed url="<https://mms2026atmoa.sched.com/event/2HHGJ>" %}

{% embed url="<https://mms2026atmoa.sched.com/event/2HHE7>" %}

</details>

### May 22 - Recast Right Click Tools Release Show

{% embed url="<https://www.recastsoftware.com/resources/right-click-tools-release-show/>" %}

{% embed url="<https://events.teams.microsoft.com/event/ab846d2c-c6e1-4b0c-a693-111034347ac0@9315bb44-6348-46c6-bd37-8880b87e774e>" %}

<details>

<summary>Expand for more events</summary>

### June 19 - Recast Right Click Tools Release Show

{% embed url="<https://www.recastsoftware.com/resources/right-click-tools-release-show/>" %}

{% embed url="<https://events.teams.microsoft.com/event/79096e74-1c43-454d-bf0d-5602212a46c6@9315bb44-6348-46c6-bd37-8880b87e774e>" %}

### July 17 - Recast Right Click Tools Release Show

{% embed url="<https://www.recastsoftware.com/resources/right-click-tools-release-show/>" %}

{% embed url="<https://events.teams.microsoft.com/event/6d107fcd-eff3-4df5-a210-fefcee47697b@9315bb44-6348-46c6-bd37-8880b87e774e>" %}

### August 21 - Recast Right Click Tools Release Show

{% embed url="<https://www.recastsoftware.com/resources/right-click-tools-release-show/>" %}

{% embed url="<https://events.teams.microsoft.com/event/bdc5e28f-87da-4c1d-90ce-b18a4ca1ea31@9315bb44-6348-46c6-bd37-8880b87e774e>" %}

### September 18 - Recast Right Click Tools Release Show

{% embed url="<https://www.recastsoftware.com/resources/right-click-tools-release-show/>" %}

{% embed url="<https://events.teams.microsoft.com/event/c13f62ec-b4b1-46c4-b01e-3c811d934e94@9315bb44-6348-46c6-bd37-8880b87e774e>" %}

### October 23 - Recast Right Click Tools Release Show

{% embed url="<https://www.recastsoftware.com/resources/right-click-tools-release-show/>" %}

{% embed url="<https://events.teams.microsoft.com/event/b76e97b7-fda3-4a13-943c-8b84bac7f286@9315bb44-6348-46c6-bd37-8880b87e774e>" %}

### November 20 - Recast Right Click Tools Release Show

{% embed url="<https://www.recastsoftware.com/resources/right-click-tools-release-show/>" %}

{% embed url="<https://events.teams.microsoft.com/event/be6b4582-20b6-4477-9120-ce2c6ebc8d93@9315bb44-6348-46c6-bd37-8880b87e774e>" %}

### December 18 - Recast Right Click Tools Release Show

{% embed url="<https://www.recastsoftware.com/resources/right-click-tools-release-show/>" %}

{% embed url="<https://events.teams.microsoft.com/event/59bdae7d-79cb-426a-82bb-da1dd8a4e660@9315bb44-6348-46c6-bd37-8880b87e774e>" %}

</details>


# OSDCloud Community Links

## Reddit

{% embed url="<https://www.reddit.com/user/RecastSoftware/>" %}

{% embed url="<https://www.reddit.com/r/RecastSoftware/>" %}

{% embed url="<https://www.reddit.com/r/Intune/>" %}

{% embed url="<https://www.reddit.com/r/MDT/>" %}

{% embed url="<https://www.reddit.com/r/PowerShell/>" %}

{% embed url="<https://www.reddit.com/r/SCCM/>" %}

{% embed url="<https://www.reddit.com/r/sysadmin/>" %}

## Discord

### WinAdmins #recast-software

{% embed url="<https://discord.com/channels/618712310185197588/1225493794997272687>" %}

### WinAdmins #osdcloud

{% embed url="<https://discord.com/channels/618712310185197588/621205976351113216>" %}


# OSDCloud FAQ

## What is OSDCloud?

OSDCloud is a tool to deploy Windows Operating Systems, without a network infrastructure (servers). Windows Image and OEM Driver Packs are downloaded at runtime. This method is also considered Cloud OS Deployment.

## What Operating Systems are supported?

Windows 11 23H2/24H2/25H2 x64 (both amd64 and arm64)

## What Devices are supported?

Any UEFI device compatible with Windows should work with OSDCloud.

## What are some OSDCloud use cases?

OSDCloud is used to reimage a device.

* Preparing a device for Windows Autopilot as Intune does not have a method to apply an image to a not-existing device. Intune is used for preparing existing devices with a Reset or a Refresh.
* Replacement for existing OS Deployment technologies, such as MDT or ConfigMgr
* Disaster Recovery in cases where existing methods may be compromised
* Hardware replacement without an OS. For example, installing a new disk which contains no existing Operating System.

## What are the Requirements?

As OSDCloud is run from WinPE (Windows Preinstallation Environment), many of these dependencies need to be included in WinPE, typically by mounting and injecting the dependencies.

* WinPE Boot Image. Can be built using the Windows ADK, MDT, ConfigMgr, OSDCloud (Cmdlets) or OSDWorkspace.
* Boot Method. Typically this is a USB Drive, but can be ISO for a VM, CD/DVD ROM for drives, or PXE for Network Boot.
* Hardware Drivers. These should be injected in the WIM Boot Image and should support the device hardware.
* Internet access. Windows Images are downloaded from Microsoft. DriverPacks are downloaded from OEMs (HP, Dell, Lenovo, Microsoft Surface).
* curl.exe (WinPE)
  * Used for downloading large files. This is not included in WinPE by default.
* PowerShell (WinPE)
  * This is added to WinPE by the Windows ADK.
* PowerShell Cmdlets (WinPE)
  * Dism for applying the Windows Image. This is added to WinPE by the Windows ADK.
  * Storage for disk partitioning and formatting. This is added to WinPE by the Windows ADK.
* PowerShell Modules (WinPE)
  * OSDCloud <https://www.powershellgallery.com/packages/OSDCloud/>
  * OSD <https://www.powershellgallery.com/packages/OSD/>
* PowerShell functionality (WinPE)
  * PowerShell should be able to install and update PowerShell Modules.


# OSDCloud Module Updates

## OSDCloud PowerShell Module

{% updates format="full" %}
{% update date="2026-03-12" %}

## Windows 11 25H2 Update

* Updated Windows 11 25H2 to March 2026 update
  {% endupdate %}

{% update date="2026-03-04" %}

## March 2026 Update

* DateTime Internet Sync
* External Logs
* OS Catalog Raw Format
* DriverPack Catalog Raw Format
* DriverPack Catalog Auto-Update
* DriverPack Visible Release Date
  {% endupdate %}

{% update date="2026-02-12" %}

## February 2026 Update

* OSDCloud by Recast rebrand
  {% endupdate %}
  {% endupdates %}


# Features

New features are added to OSDCloud on a monthly basis and presented at Recast's monthly Right Click Tools Release Show

{% embed url="<https://www.recastsoftware.com/resources/right-click-tools-release-show/>" %}

## OSDCloud Features

A new version of OSDCloud was released in the [OSDCloud PowerShell Module](https://www.powershellgallery.com/packages/OSDCloud/), also known as "OSDCloud v2". This version uses a new engine for OS Deployment backed by a Task Sequence.

To ensure you have the latest requirements, use [OSDCloud Live](/osdcloud-live/about). A new tool for creating OSDCloud ready boot images will be released in the near future.

The following table details the new features that are added to OSDCloud and the required version of the [OSDCloud PowerShell Module](https://www.powershellgallery.com/packages/OSDCloud/). OSDCloud Editions are used to detail the availability of the feature. Editions will be expanded upon starting in **May 2026**.

<table><thead><tr><th width="283.666748046875">Feature</th><th width="218.238037109375">OSDCloud Module Version</th><th>OSDCloud Edition</th></tr></thead><tbody><tr><td><a href="/pages/WRQq0IZzPXieB4UrHjBU"><strong>Apply OOB Drivers to WinOS</strong></a></td><td>25.3.27.1</td><td>Community, Insiders</td></tr><tr><td><a href="/pages/ypwsJbDPphUhmvmrNG7z"><strong>Apply OOB Drivers to WinRE</strong></a></td><td>25.9.30.3</td><td>Insiders</td></tr><tr><td><a href="/pages/dg3tEv9ItKRap4kpRvfI"><strong>DateTime Internet Sync</strong></a></td><td>26.3.4.2</td><td>Insiders</td></tr><tr><td><a href="/pages/oKi4249WuKktjDFJWycY"><strong>External Logs</strong></a></td><td>26.3.4.2</td><td>Insiders</td></tr><tr><td><a href="/pages/gPI4IlmnyQXb60cl4o51"><strong>OS Catalog Raw Format</strong></a></td><td>26.3.4.2</td><td>Community, Insiders</td></tr><tr><td><a href="/pages/QieSoBJDfKbyDSLnCLYo"><strong>DriverPack Catalog Raw Format</strong></a></td><td>26.3.4.2</td><td>Community, Insiders</td></tr><tr><td><a href="/pages/twy2GYaX6YlKcsayo2Pk"><strong>DriverPack Catalog Auto-Update</strong></a></td><td>26.3.4.2</td><td>Insiders</td></tr><tr><td><a href="/pages/b5AoLI6e7PSjVg8W72Sl"><strong>DriverPack Visible Release Date</strong></a></td><td>26.3.4.2</td><td>Community, Insiders</td></tr></tbody></table>

## OSDCloud (Legacy) Features

The following table details features in OSDCloud (Legacy) in the [OSD PowerShell Module](https://www.powershellgallery.com/packages/OSD/), also known as "**OSDCloud v1**". Some features of OSDCloud (Legacy) are in review or not planned to be released in the [OSDCloud PowerShell Module](https://www.powershellgallery.com/packages/OSDCloud/). If you have a requirement for any of these features, please submit a Recast Software [Feature Request](https://www.recastsoftware.com/feature-requests/).

| Feature                     | OSDCloud Module Version |
| --------------------------- | ----------------------- |
| **Azure Deployment**        | In Review               |
| **Command Line Deployment** | In Review               |
| **Custom WIM Deployment**   | In Review               |
| **Mounted ISO Deployment**  | In Review               |
| **Automate Scripts**        | Not Planned             |
| **OSDCloud Templates**      | Not Planned             |
| **OSDCloud Workspace**      | Not Planned             |


# Apply OOB Drivers to WinOS

This is possibly the most impactful feature of Deploy-OSDCloud in allowing any device to work with OSDCloud. In a nutshell, if your hardware devices work in WinPE (disk, network), they should work in OOBE, allowing you to perform Autopilot or Entra Join, even without a supported DriverPack.

***

## OSDCloud Comparison

| Function            | Module       | Version   | Status      |
| ------------------- | ------------ | --------- | ----------- |
| **Deploy-OSDCloud** | **OSDCloud** | 25.3.27.1 | **Enabled** |
| Start-OSDCloud\*    | OSD          | -         | Not Planned |

## Feature

In WinPE, OSDCloud will perform the following steps:

* Export the in-use out-of-box drivers to `C:\Windows\Temp\osdcloud-drivers-winpe` using pnputil.exe
* Drivers in `C:\Windows\Temp\osdcloud-drivers-winpe` are imported in the offline Windows 11 installation at `C:\`

<figure><img src="/files/Mn1UsS1MoJ238mGVYIWR" alt=""><figcaption></figcaption></figure>


# Apply OOB Drivers to WinRE

Similar to the [Apply OOB Drivers to WinOS](/features/apply-oob-drivers-to-winos) feature, this feature will apply the same drivers to the offline WinRE Recovery Image, ensuring that your device will be able to use the Recovery Environment with your existing hardware (disk, network) fully functional.

***

## OSDCloud Comparison

| Function            | Module       | Version   | Status      |
| ------------------- | ------------ | --------- | ----------- |
| **Deploy-OSDCloud** | **OSDCloud** | 25.9.30.3 | **Enabled** |
| Start-OSDCloud\*    | OSD          | -         | Not Planned |

## Feature

In WinPE, OSDCloud will perform the following steps:

* Export the in-use out-of-box drivers to `C:\Windows\Temp\osdcloud-drivers-winpe` using pnputil.exe
* WinRE Recovery Image at `C:\Windows\System32\Recovery\Winre.wim` is mounted
* Drivers in `C:\Windows\Temp\osdcloud-drivers-winpe` are imported to the mounted WinRE Recovery Image
* WinRE Recovery Image is dismounted

<figure><img src="/files/WsJD0PnyK4hwCsM3Xgkq" alt=""><figcaption></figcaption></figure>


# DateTime Internet Sync

Devices that do not have a current DateTime can experience issues with SSL/TLS handshakes whic will cause failures downloading DriverPacks over HTTPS. This issue typically occurs when a device has been disconnected from power for an extended period of time. Additionally, a DateTime that is not correctly set will impact Autopilot or Entra Join.

This feature will set the accurate internet DateTime, regardless of the WinPE TimeZone.

***

## OSDCloud Comparison

| Function            | Module       | Version  | Status      |
| ------------------- | ------------ | -------- | ----------- |
| **Deploy-OSDCloud** | **OSDCloud** | 26.3.4.2 | **Enabled** |
| Start-OSDCloud\*    | OSD          | -        | Not Planned |

## Feature

In WinPE, if the device is connected to the internet, OSDCloud will automatically sync the system clock to the Google's UTC DateTime if the difference is greater than 5 minutes.

In the screenshot below the Windows PowerShell Title Bar displays the existing DateTime. When `Sync-WinPEInternetDateTime` is automatically invoked by `Deploy-OSDCloud`, the device will be automatically set to the current internet DateTime using Set-Date.

{% hint style="info" %}
`Sync-WinPEInternetDateTime` is a private function in the OSDCloud PowerShell Module
{% endhint %}

<figure><img src="/files/DSssrHtWd0aKT92PrXEr" alt=""><figcaption></figcaption></figure>


# External Logs

This feature is useful for gathering the hardware information about a device, or to determine if additional drivers need to be added to the WinPE Boot Image.

***

## OSDCloud Comparison

| Function            | Module       | Version  | Status      |
| ------------------- | ------------ | -------- | ----------- |
| **Deploy-OSDCloud** | **OSDCloud** | 26.3.4.2 | **Enabled** |
| Start-OSDCloud\*    | OSD          | -        | Not Planned |

## Feature

In WinPE, OSDCloud will natively generate log files at `X:\Windows\Temp\osdcloud-logs`

Creating a folder on a connected drive named `OSDCloudLogs` will copy log files generated by `Initialize-OSDCloudDevice` to the following path:

```
<DriveLetter>:\OSDCloudLogs\<SerialNumber>
```

{% hint style="info" %}
The `Initialize-OSDCloudDevice` private function is run automatically when executing `Deploy-OSDCloud`
{% endhint %}

<figure><img src="/files/Mk1sa1XIVkC6ZNQ6PqVn" alt=""><figcaption></figcaption></figure>


# OS Catalog Raw Format

Windows 11 Catalogs are provided by Microsoft in an XML format. In previous versions of OSDCloud, these files were compiled and converted into JSON format, known as the OSDCloud OS Catalog. This format sometimes required some time to build before being published in an updated OSDCloud.

OS Catalogs in RAW Format (unmodified) allow for faster updates of OSDCloud to use the latest available Windows 11 releases.

***

## OSDCloud Comparison

| Function            | Module       | Version  | Status      |
| ------------------- | ------------ | -------- | ----------- |
| **Deploy-OSDCloud** | **OSDCloud** | 26.3.4.2 | **Enabled** |
| Start-OSDCloud\*    | OSD          | -        | Not Planned |

## Feature

In the screenshot below, the Windows 11 OS Catalog files are displayed included their native XML format in the OSDCloud PowerShell Module. When launching Deploy-OSDCloud, these files are used to generate the Operating System options for OSDCloud.

<figure><img src="/files/1odmJGBQ3AnaTgOIZZB5" alt=""><figcaption></figcaption></figure>


# DriverPack Catalog Raw Format

DriverPack Catalogs used by OEMs are in varying formats and are not universal. In previous versions of OSDCloud, these files were compiled and converted into JSON format, known as the OSDCloud DriverPack Catalog. This format sometimes required some time to build before being published in an updated OSDCloud, leading to out of date or unavailable DriverPacks.

DriverPack Catalogs in Raw Format (unmodified) allow for faster updates of OSDCloud to use the latest available OEM DriverPacks.

***

## OSDCloud Comparison

| Function            | Module       | Version  | Status      |
| ------------------- | ------------ | -------- | ----------- |
| **Deploy-OSDCloud** | **OSDCloud** | 26.3.4.2 | **Enabled** |
| Start-OSDCloud\*    | OSD          | -        | Not Planned |

## Feature

In the screenshot below, the DriverPack Catalogs are included their native format in the OSDCloud PowerShell Module. When launching Deploy-OSDCloud, these files are used to generate the DriverPack options for OSDCloud, without the need for a master DriverPack Catalog.

<figure><img src="/files/RMdueNDARiYzMawhOjwM" alt=""><figcaption></figcaption></figure>


# DriverPack Catalog Auto-Update

In previous versions of OSDCloud, DriverPack Catalogs were compiled and converted into JSON format, known as the OSDCloud DriverPack Catalog. This format sometimes required some time to build before being published in an updated OSDCloud, leading to out of date or unavailable DriverPacks as newer versions were published.

***

## OSDCloud Comparison

| Function            | Module       | Version  | Status      |
| ------------------- | ------------ | -------- | ----------- |
| **Deploy-OSDCloud** | **OSDCloud** | 26.3.4.2 | **Enabled** |
| Start-OSDCloud\*    | OSD          | -        | Not Planned |

## Feature

OSDCloud will download the latest OEM DriverPack Catalog directly from the OEM to ensure the latest DriverPacks are available. This update is transparent during normal use and only visible when using the following command when launching OSDCloud.

```powershell
Deploy-OSDCloud -Verbose
```

<figure><img src="/files/Y8m1HA3tECgcxwrksksT" alt=""><figcaption></figcaption></figure>


# DriverPack Visible Release Date

***

## OSDCloud Comparison

| Function            | Module       | Version  | Status      |
| ------------------- | ------------ | -------- | ----------- |
| **Deploy-OSDCloud** | **OSDCloud** | 26.3.4.2 | **Enabled** |
| Start-OSDCloud\*    | OSD          | -        | Not Planned |

## Feature

In the screenshot below, the OEM DriverPacks that are available are displayed with their release date so you can determine if a DriverPack is too old to apply. While these are the latest available DriverPacks from the OEM, an old DriverPack may contain vulnerabilities. In this case, you may want to not apply the DriverPack and instead use other methods, like Windows Update.

<figure><img src="/files/oDpglxolheFBlxx1p5hf" alt=""><figcaption></figcaption></figure>


# About OSDCloud Live

OSDCloud Live (osdcloud.live) is a GitHub Repository used for testing OSD related PowerShell scripts easily, without having to install a PowerShell Module and related dependencies.

The following endpoints are available for use

* [Test OSDCloud requirements using your WinPE Boot Image](/osdcloud-live/about/test.osdcloud.live)
* [Deploy OSDCloud using your existing WinPE Boot Image](/osdcloud-live/about/deploy.osdcloud.live)
* [Export third-party drivers from your existing Windows 11 PC](/osdcloud-live/about/exportoem.osdcloud.live)

To review the scripts in the GitHub Repository, select the link below.

{% embed url="<https://github.com/OSDeploy/osdcloud.live>" %}


# test.osdcloud.live

This endpoint allows you to test your WinPE Boot Image to determine issues with PowerShell or to resolve dependencies needed for OSDCloud (curl)

## Requirements

* ADK related Boot Image with the following Optional Components
  * WinPE-WMI
  * WinPE-NetFX
  * WinPE-Scripting
  * WinPE-PowerShell
  * WinPE-StorageWMI
  * WinPE-DismCmdlets
* Internet connectivity
* Drivers for boot device

{% hint style="info" %}
For assistance on creating a WinPE boot image, review the following article
{% endhint %}

{% embed url="<https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-adding-powershell-support-to-windows-pe?view=windows-11>" %}

## Boot to a WinPE Boot Image

### MDT Boot Image

In this example, an MDT boot image is used, displaying the Welcome Wizard. You should be able to select "**Exit to Command Prompt**", or press <kbd>**F8**</kbd> to open a command prompt.

<figure><img src="/files/mFpAUUCKjKaV4TqEdwoa" alt=""><figcaption></figcaption></figure>

### Start PowerShell

In the Command Prompt, enter start powershell to open PowerShell in a new window.

<figure><img src="/files/F1JT9MwzY5vshNPwczOR" alt=""><figcaption></figcaption></figure>

### Run test.osdcloud.live

Run the following command in PowerShell

```
Invoke-RestMethod 'https://test.osdcloud.live' | Invoke-Expression
```

<figure><img src="/files/COquRKBZMuQDU4bopT79" alt=""><figcaption></figcaption></figure>

## OSDWorkspace Example

A typical boot image created with `OSDWorkspace` 26.2.12+ should already have most of these items resolved.

<figure><img src="/files/CKLjJi1u46JWTwdaNkBL" alt=""><figcaption></figcaption></figure>

## Failure Example&#x20;

This ConfigMgr Boot Image does not have ADK Optional Components for Dism or StorageWMI and cannot be updated online. You will need to rebuild your Boot Image with these components.

<figure><img src="/files/3VijsWvnBTPSaVRI0aAL" alt=""><figcaption></figcaption></figure>


# deploy.osdcloud.live

This endpoint is used to repair issues with WinPE, bootstrap dependencies for OSDCloud, and to start an OSDCloud deployment by invoking Deploy-OSDCloud

## Requirements

* ADK related Boot Image with the following Optional Components
  * WinPE-WMI
  * WinPE-NetFX
  * WinPE-Scripting
  * WinPE-PowerShell
  * WinPE-StorageWMI
  * WinPE-DismCmdlets
* Internet connectivity
* Drivers for boot device

{% hint style="info" %}
For assistance on creating a WinPE boot image, review the following article
{% endhint %}

{% embed url="<https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-adding-powershell-support-to-windows-pe?view=windows-11>" %}

## Boot to a WinPE Boot Image

### MDT Boot Image

In this example, an MDT boot image is used, displaying the Welcome Wizard. You should be able to select "**Exit to Command Prompt**", or press <kbd>**F8**</kbd> to open a command prompt.

<figure><img src="/files/mFpAUUCKjKaV4TqEdwoa" alt=""><figcaption></figcaption></figure>

### Start PowerShell

In the Command Prompt, enter start powershell to open PowerShell in a new window.

<figure><img src="/files/F1JT9MwzY5vshNPwczOR" alt=""><figcaption></figcaption></figure>

### Run deploy.osdcloud.live

Run the following command in PowerShell

```
Invoke-RestMethod 'https://deploy.osdcloud.live' | Invoke-Expression
```

<figure><img src="/files/nMknun3u1jSYZruDTltW" alt=""><figcaption></figcaption></figure>

### OSDCloud

Deploy-OSDCloud should start automatically. Press Start to deploy Windows to this device

<figure><img src="/files/uF88kOzEmX4604ZOPzI4" alt=""><figcaption></figcaption></figure>

## OSDWorkspace Example

A typical boot image created with `OSDWorkspace` 26.2.12+ should already have most of these items resolved.

<figure><img src="/files/js7SdnAjFOaAZkZx4XoV" alt=""><figcaption></figcaption></figure>

## Failure Example&#x20;

This ConfigMgr Boot Image does not have ADK Optional Components for Dism or StorageWMI and cannot be updated online. You will need to rebuild your Boot Image with these components.

<figure><img src="/files/ACAmyJUhS3MmiZG8NI2q" alt=""><figcaption></figcaption></figure>


# exportoem.osdcloud.live

This endpoint is used to export OEM Drivers from Windows 11.

The exported oem drivers can then be added to your WinPE Boot Image to allow support for your device, or they can also be used in a Task Sequence to inject into your offline Windows OS.

This script will export drivers that are in-use, meaning there is hardware present that is using this specific driver.

## OEM Drivers

OEM Drivers are added to Windows to support device hardware. These drivers are also known as **Out-of-Box Drivers** as they were not included in the Windows 11 OS. Drivers that are included in the Windows 11 OS by Microsoft are referred to as **Inbox Drivers**.

**OEM Drivers** are located at **C:\Windows\INF** and are identified with the naming pattern **`oem*.inf`**

<figure><img src="/files/bKesO0qqQfl7dONpYzrE" alt=""><figcaption></figcaption></figure>

### Device Preparation

It is recommended that you allow Windows to fully install to your device, and use Windows Update or a Driver Pack to install drivers for all the hardware on your device, including attached devices such as a docking station.

i.e. Completely setup Windows on your device as soon as you unbox it

### Run exportoem.osdcloud.live

Run the following command in PowerShell as Administrator

```
Invoke-RestMethod 'https://exportoem.osdcloud.live' | Invoke-Expression
```

OEM Drivers will be exported to the following path

```powershell
$env:TEMP\exportoem
```

When the exportoem script is complete, Windows Explorer will open the above path

<figure><img src="/files/D9ebelBpsNIhHr7xwqLA" alt=""><figcaption></figcaption></figure>

Two folders will have been created in the exportoem folder. The folder with the winpe prefix is smaller in size and can be used in your WinPE Boot Image.


# Start OSDCloud from an MDT or ConfigMgr Boot Image

You can use OSDCloud with an existing MDT or ConfigMgr Boot Image.

## Requirements

* Boot Image required ADK Optional Components
  * WinPE-WMI
  * WinPE-NetFX
  * WinPE-Scripting
  * WinPE-PowerShell
  * WinPE-StorageWMI
  * WinPE-DismCmdlets
* Internet connectivity
  * OSDCloud PowerShell Module
  * Microsoft Windows 11 ESD
  * OEM Driver Packs
* Device drivers installed in Boot Image

## Boot to MDT or ConfigMgr Boot Image

### MDT Boot Image

In this example, an MDT boot image is used, displaying the Welcome Wizard. You should be able to select "**Exit to Command Prompt**", or press <kbd>**F8**</kbd> to open a command prompt.

<figure><img src="/files/mFpAUUCKjKaV4TqEdwoa" alt=""><figcaption></figcaption></figure>

### Start PowerShell

In the Command Prompt, enter start powershell to open PowerShell in a new window.

<figure><img src="/files/F1JT9MwzY5vshNPwczOR" alt=""><figcaption></figcaption></figure>

### Bootstrap deploy.osdcloud.live

Run the following command in PowerShell to bootstrap OSDCloud

```
Invoke-RestMethod 'https://deploy.osdcloud.live' | Invoke-Expression
```

<figure><img src="/files/nMknun3u1jSYZruDTltW" alt=""><figcaption></figcaption></figure>

### OSDCloud

Deploy-OSDCloud should start automatically

<figure><img src="/files/uF88kOzEmX4604ZOPzI4" alt=""><figcaption></figcaption></figure>


# Deploy-OSDCloud Overview

After launching Deploy-OSDCloud, a GUI frontend will be displayed with a top menu, device information, and Deployment Settings

<figure><img src="/files/sDKchdewORjEwz1yitNN" alt=""><figcaption></figcaption></figure>

## Logs (menu)

Logs that are generated prior to the launch of the frontend are added dynamically to Logs menu. Items selected from this menu will open in Notepad.

<figure><img src="/files/BcIsg6Ti5CWWaEXFiezu" alt=""><figcaption></figcaption></figure>

### OSDCloudDevice.json

Contains information about the device, and is used for the OSDCloud deployment. This log is information only. Editing this file will have no impact on OSDCloud.

<figure><img src="/files/l1xOJgbeUVPJ54nyJMdE" alt=""><figcaption></figcaption></figure>

## WMI (menu)

This menu contains exports of WMI classes that were used in getting device information. This menu is dynamically created. Items selected from this menu will open in Notepad.

<figure><img src="/files/Cysw3kku0SjaxYOvFHAt" alt=""><figcaption></figcaption></figure>

## Shell (menu)

This menu contains shortcuts to `Command Prompt` and `Windows PowerShell` and are used to launch a new session if needed. If you have `PowerShell 7` added to your boot image, a shortcut to `pwsh` will be added to this menu.

<figure><img src="/files/VNRCeWD41Re5vcdEJvXM" alt=""><figcaption></figcaption></figure>

## Privacy (menu)

Current privacy information is displayed when accessing this item.

<figure><img src="/files/VH190M92zanoE4RQpFfY" alt=""><figcaption></figcaption></figure>

## Device Information

Information about your current device is displayed in the Device Information area.

* TPM 2.0
  * \[Boolean] if the device supports 2.0
* Autopilot Spec
  * \[Boolean] if the device supports Autopilot

<figure><img src="/files/10aV7qQClVKHFW7sePTt" alt=""><figcaption></figcaption></figure>

## Deployment Settings

### Task Sequence

OSDCloud executes a deployment based on a defined Task Sequence. More will be added over time as feedback and requirements permit. The default should always be named `OSDCloud`.

<figure><img src="/files/kWUi4yIZ07AANCtf5Ab1" alt=""><figcaption></figcaption></figure>

### Operating System

Operating Systems are defined with a Version (ReleaseId). Changing an Operating System will reflect a change in the text area to the right, which reflects the current selection including Language, Edition, and Activation options)

Windows 11 Versions are removed when Microsoft no longer defines them as General Availability Channel in the following article.

{% embed url="<https://learn.microsoft.com/en-us/windows/release-health/supported-versions-windows-client>" %}

There are no plans to support Windows 11 26H1 as Microsoft has not made this version available for wide distribution.

{% hint style="info" %}
The default is the latest available operating system, currently Windows 11 25H2
{% endhint %}

<figure><img src="/files/0VaGcx1zgDglUXGwwugr" alt=""><figcaption></figcaption></figure>

### Language

A Language Code can be selected from this option. The Language name is displayed to the right of this option. Changing the Language Code will reflect a change in the Operating System text area.

{% hint style="info" %}
The default Language is en-us English (United States)
{% endhint %}

<figure><img src="/files/wvGu6m310ehx4zQtl5mH" alt=""><figcaption></figcaption></figure>

### Edition

An Edition can be selected from the available options. LTCS and IOT Editions are not supported by OSDCloud.

{% hint style="info" %}
The default edition is Pro
{% endhint %}

<figure><img src="/files/rCuevzFIcjoXDXgvixhx" alt=""><figcaption></figcaption></figure>

### Activation

Retail or Volume can be selected, based on the selected Edition. Changing the Activation will reflect a change in the Operating System text area.

{% hint style="info" %}
The default Windows Activation is Retail
{% endhint %}

<figure><img src="/files/PRc9TQiZZek7jPb5RKtn" alt=""><figcaption></figcaption></figure>

### FileName

As Operating System options are set, the final Microsoft ESD FileName will be set. Information in this file contain information about the Build, Version, Activation, Architecture, and Language.

{% hint style="info" %}
OSDCloud updates the Build as available by Microsoft, so this FileName may change monthly
{% endhint %}

<figure><img src="/files/WhM4YAsZUe5SUbtEFff7" alt=""><figcaption></figcaption></figure>

### DriverPack

A compatible DriverPack is automatically selected based on the device information. If a DriverPack is automatically selected, it is an OEM defined match, regardless of the name displayed. Additional information may be displayed in the DriverPack name, such as the DriverPack id and the release date.

OEMs typically do not update DriverPacks after the first 2 years of a model release. We do not recommend installing an old DriverPack.

<figure><img src="/files/wOxZEUawvGLFC6kjw4Ys" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
OSDCloud does not control the content or the results of a selected DriverPack. If a DriverPack is problematic, we can take steps to remove the publication in OSDCloud as a remediation. If you experience issues or are concerned about the age of the DriverPack, you have the option to select None or Microsoft Update Catalog
{% endhint %}

<figure><img src="/files/ajr1elSWEaeiFEEPQepu" alt=""><figcaption></figcaption></figure>

### DriverPack Url

A url for the selected DriverPack is displayed for review.

<figure><img src="/files/fSl9nvVHMC9q3xtmwKol" alt=""><figcaption></figcaption></figure>

### Start

Press the Start button to begin the Windows 11 deployment using OSDCloud.

<figure><img src="/files/ASa9Wh4ZNLlDTzfC7WCH" alt=""><figcaption></figcaption></figure>


# OSDCloud v1


# OSDCloud


# Contributors


# Local Setup

OSD 23.5.21.1+ Updated May 21, 2023

## Prerequisites

### Admin Rights

You are going to be mounting wim files, so yes, this is an absolute with no way around it

### Open Internet

You are going to be downloading lots of stuff, so you need Internet access.  There is no Proxy or Firewall configuration in OSDCloud yet, but it is planned

### OSD PowerShell Module

This changes frequently until OSDCloud is working fully, so I recommend that you wash, rinse, and repeat this command frequently

```
Install-Module OSD -Force
```

### PowerShell Capable

Finally, you need to be PowerShell capable, or at least be willing to learn how to use PowerShell.  I do not offer individual training sessions

## Machine Configuration

The first decision you need to make is whether or not you want Wireless to work in WinPE.  If you do, then you must create your OSDCloud Template on Windows 10 as you will be using Windows 10's WinRE.  Windows 11 WinRE isn't compatible with older systems, and virtual machines.

If your HOST Operating System is running Windows 11, you can use the Windows 11 ADK's winpe.wim, or you can create a Hyper-V Virtual Machine and install Windows 10 21H2 and use that

### Install the Windows ADK

Once you have your OS sorted out, you will need to install the Microsoft Windows ADK.  Download the proper ADK and make sure you install the Deployment Tools

{% embed url="<https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install>" %}

![](/files/SbliLQaqjilAvQoqVRF7) ![](/files/UUKyRJIeYWaKqG84GwlW)

After the ADK Deployment Tools install is complete, download and install the Windows PE add-on for the ADK

![](/files/EfSBCBUwSXtIag90htbS) ![](/files/umYrVxNupqSTtNGAMcgP) ![](/files/cw9ctJTHER3m7Z68iLp7) ![](/files/MsPYXPN3S27XoC3i4try)

### Microsoft DaRT Integration

If you have Microsoft Desktop Optimization Pack 2015, you can install Microsoft DaRT 10.  This will allow you to have DaRT Tools in your OSDCloud WinPE Media

![](/files/l7TPW8EHfy7FwnBYbhxP) ![](/files/oRHwnK6fOY7sznngmGSf) ![](/files/VeljIFGjpW4ShFwM84nw)

### Microsoft Deployment Toolkit

{% hint style="warning" %}
If you don't have DaRT installed, skip this step
{% endhint %}

For DaRT 10 to work in WinPE you will also need a Dart Config file.  The easiest way to get this is to install Microsoft Deployment Toolkit

{% embed url="<https://www.microsoft.com/en-us/download/details.aspx?id=54259>" %}

![](/files/snx5kPqloWv63nPrOqh0) ![](/files/8cUurqdIyGVdC6WmGNMa) ![](/files/8GmCWMsw3Ed4waTfL6sy) ![](/files/nLHxcoqiizfQRhh0BSu2)

### PowerShell

The final steps are to make sure that your Execution Policy is set properly, and to install the OSD PowerShell Module if you haven't already

```powershell
Set-ExecutionPolicy RemoteSigned -Force
Install-Module OSD -Force
```

![](/files/yYDsJb4IeOQ9WPF3bqHL)


# OSDCloud Template

OSD 23.5.16.2+ Updated May 18, 2023

Now that you have your Machine Configuration complete, the next thing to do is to create an OSDCloud Template.  This is called a Template as it will be used to create multiple OSDCloud Workspaces (multiple variations).  You'll understand why this is needed over the next few pages

## New-OSDCloudTemplate

{% hint style="info" %}
**This function requires elevated Admin Rights**
{% endhint %}

{% embed url="<https://github.com/OSDeploy/OSD/blob/master/Docs/New-OSDCloudTemplate.md>" %}
Online Help
{% endembed %}

The default OSDCloud Template exists at C:\ProgramData\OSDCloud.  You can create one here using the following command

```powershell
New-OSDCloudTemplate
```

Once you run this command, an OSDCloud Template will be created from the Windows ADK, there's really nothing to it.  If you want to learn more, go through the next few pages


# Build Process

OSD 23.5.15.1+ Updated May 15, 2023

The next few screenshots will detail the steps that are needed to make OSDCloud work

### Initialize

1. Start writing the PowerShell Transcript
2. Mirror the ADK Media directory to the OSDCloud Template
3. Copy the ADK winpe.wim to the OSDCloud Template boot.wim
4. Mount the boot.wim
5. Mount the WinPE registry to get the WinPE Info

<figure><img src="/files/eUNa5bOQdw0gXqYe2akx" alt=""><figcaption></figcaption></figure>

### ADK Packages

1. Inject ADK Packages for PowerShell functionality
2. Save the Windows Image

<figure><img src="/files/hECLEN2S4vnMknW0uNG1" alt=""><figcaption></figcaption></figure>

### Tweaks

1. Copy some helper files from the running OS
2. If MDT is installed, add the Dart Configuration
3. If Microsoft Dart is installed, inject the Tools
4. Save the Windows Image
5. Set the WinPE PowerShell ExecutionPolicy
6. Enable PowerShell Gallery support
7. Remove winpeshl.ini if it is present
8. Change some settings for a better Command Prompt experience

<figure><img src="/files/UaaL0PSWaGSQkJEmNo6Y" alt=""><figcaption></figcaption></figure>

### Packages

1. Display the installed Windows Packages

<figure><img src="/files/kXOQD9hMgtE6tKCoMBUo" alt=""><figcaption></figcaption></figure>

### Complete

1. Dismount the Windows Image
2. Export the Boot.wim to compress the file
3. Create empty configuration directories
4. Create the ISOs
5. Set the OSDCloud Template to the new path
6. Stop writing the PowerShell Transcript

<figure><img src="/files/IpQXpElxHNNYi3NCzffK" alt=""><figcaption></figcaption></figure>


# Logs

OSD 23.5.15.1+ Updated May 15, 2023

If you are a fan of logs, you'll enjoy reading through these.  If you have issues creating your OSDCloud Template make sure you go through these first.  They are here for a reason ... and to audit everything that's been done to your WinPE

<figure><img src="/files/ZXVHr1UX75TC8GMVUrpb" alt=""><figcaption></figcaption></figure>

## References


# Named Templates

OSD 23.5.15.1+ Updated May 15, 2023

There may come a time when you need to create multiple OSDCloud Templates.  I'll get into this further in the next few pages, but let's cover the basics here

## -Name

To create a named OSDCloud Template, simply use the `Name` parameter

<figure><img src="/files/15RxaXsGUXBVPHShKuov" alt=""><figcaption><p>New-OSDCloudTemplate -Name 'My New Profile'</p></figcaption></figure>

## Get-OSDCloudTemplate

When you create a new OSDCloud Template, that will be the one that gets used by default going forward, until it is changed.  To find out what your current OSDCloud Template is, use this function

```powershell
PS C:\> Get-OSDCloudTemplate
C:\ProgramData\OSDCloud\Templates\My New Profile
```

## Get-OSDCloudTemplateNames

This function will return all the OSDCloud Templates that have been registered&#x20;

```powershell
PS C:\> Get-OSDCloudTemplateNames
default
My New Profile
```

## Set-OSDCloudTemplate

This function will If you have more than one OSDCloud Template, you can change between OSDCloud Templates using this function and the `Name` parameter

```powershell
PS C:\> Set-OSDCloudTemplate #without params, returns to default
C:\ProgramData\OSDCloud

PS C:\> Set-OSDCloudTemplate -Name 'My New Profile'
C:\ProgramData\OSDCloud\Templates\My New Profile

PS C:\> Set-OSDCloudTemplate -Name default
C:\ProgramData\OSDCloud
```

By the way, there is Tab-Complete to make your life easier

<figure><img src="/files/jPl7HAhaBuSojWpYoQwh" alt=""><figcaption></figcaption></figure>


# WinRE WiFi

OSD 23.5.15.1+ Updated May 15, 2023

In addition to using the winpe.wim that is in the ADK, you can also create an OSDCloud Template using WinRE

## -WinRE

To do this, use the `WinRE` parameter.  The benefit of using WinRE is you gain Wireless support.  One thing you need to remember is that the ADK you are using needs to match your running OS, so if your OS is Windows 11 22H2, you need to use the ADK for Windows 11 22H2.  Finally, make sure you use the `Name` parameter to keep things tidy

In my example below, you can see the WinPE-WiFi Packages that come with WinRE

<figure><img src="/files/Y9sP9kCA1kTcwnQdPtmy" alt=""><figcaption><p>New-OSDCloudTemplate -Name WinRE -WinRE</p></figcaption></figure>

## Additional Information

{% embed url="<https://msendpointmgr.com/2018/03/06/build-a-winpe-with-wireless-support/>" %}

{% embed url="<https://github.com/okieselbach/Helpers/tree/master/WirelessConnect>" %}


# Public Content

OSD 23.5.15.1+ Updated May 15, 2023

I really enjoy having Microsoft DaRT in my WinPE so I can use Explorer, but I also share out my ISO's sometimes and I can't really do that as Microsoft DaRT is licensed.   The way I get around this is by adding the word 'Public' in the `Name` and DaRT won't be added.  This makes it easy to share out some of my work and not forgetting about breaking the Microsoft rules

<figure><img src="/files/oESOxeCGnPRhzcfr36if" alt=""><figcaption><p>New-OSDCloudTemplate -Name Public</p></figcaption></figure>

<figure><img src="/files/ph0iUKUmMIKsZFsTGaM3" alt=""><figcaption><p>New-OSDCloudTemplate -Name 'Public WinRE' -WinRE</p></figcaption></figure>


# Languages

OSD 23.5.15.1+ Updated May 15, 2023

## -Language

You can add additional languages to your WinPE by using the `Language` parameter.  In my example, I used the ADK winpe.wim and added Spanish and French to my English US WinPE so I gave a Name that will help me identify the added languages

<figure><img src="/files/DPjrvZRw9DxGQA6243bJ" alt=""><figcaption><p>New-OSDCloudTemplate -Name 'ADK en es fr' -Language es-es,fr-fr</p></figcaption></figure>

## -SetInputLocale

This parameter allows me to set the default keyboard to something else, like English (US) Dvorak

<figure><img src="/files/C4uyS4nrsDPloV8eecTL" alt=""><figcaption><p>New-OSDCloudTemplate -Name 'ADK en Dvorak' -SetInputLocale '0409:00010409'</p></figcaption></figure>

## -SetAllIntl

Finally, I can change all the International Defaults to one of the added Languages using this parameter.  This will make the following changes

* UI language
* System locale
* User locale
* Input locale

<figure><img src="/files/QSvgOVlPUx7uChfaSks4" alt=""><figcaption></figcaption></figure>


# Cumulative Updates

OSD 23.5.15.1+ Updated May 15, 2023

I've added the ability to apply a Cumulative Update to an OSDCloud Template due to the Secure Boot vulnerability.  The next two links give some details on the issue

{% embed url="<https://support.microsoft.com/en-us/topic/kb5025885-how-to-manage-the-windows-boot-manager-revocations-for-secure-boot-changes-associated-with-cve-2023-24932-41a975df-beb2-40c1-99a3-b3ff139f832d>" %}

{% embed url="<https://learn.microsoft.com/en-us/windows/deployment/update/media-dynamic-update#update-winpe>" %}

## Download the Cumulative Update

Start by downloading the update from Microsoft Update Catalog and specifying the path to the downloaded update.  Start by downloading the x64 version at this link if you are using the ADK for Windows 11 version 22H2

{% embed url="<https://www.catalog.update.microsoft.com/Search.aspx?q=KB5026372>" %}

<figure><img src="/files/sk0tCNLL9nkKOC9NrN6r" alt=""><figcaption></figcaption></figure>

## Apply the Cumulative Update

Once you have the update downloaded, use the `CumulativeUpdate` parameter and supply the Path to the downloaded MSU.  In the example below I applied this in my default OSDCloud Template as this will be the one I use the most

1. Cumulative Update is applied
2. Updated Windows Information is displayed
3. Boot files are updated
4. DISM Component Cleanup is run

<figure><img src="/files/on0I7amGFXn9qQuNVNOf" alt=""><figcaption></figcaption></figure>

## Apply the WRONG Cumulative Update

It's absolutely possible to apply the wrong Cumulative Update for WinPE, so make sure you understand that the Cumulative Update that you download must match your ADK.  So if you are using the ADK for Windows 11 version 22H2, you need the Windows 11 22H2 x64 Cumulative Update

1. Cumulative Update is applied
2. Updated Windows Information is displayed.  In this case, the UBR did not change
3. Warning is displayed that the UBR has not been changed.  The Boot files will not be updated
4. DISM Component Cleanup is run

<figure><img src="/files/8qYfSzJPB3mDytRNVU7A" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
I'm not properly staffed to answer individual questions about which Cumulative Update you need for the ADK you have installed.  If this is not something you can resolve on your own, then you should probably wait for updated Media from Microsoft that already has the Secure Boot updates applied
{% endhint %}

## The Code

If you are interested in reviewing how this works, here is a snipped from the `New-OSDCloudTemplate` function

{% embed url="<https://github.com/OSDeploy/OSD/blob/a8547e4868a9ff99fe7880fea52158ee5ff7642f/Public/OSDCloudSetup/OSDCloudTemplate.ps1#L815>" %}

<figure><img src="/files/KEkLq7wqxxnegi0gtkRb" alt=""><figcaption></figcaption></figure>


# ISO Boot Media

OSD 23.5.15.1+ Updated May 15, 2023

Just a quick note, every time you make a new OSDCloud Template, ISO's are automatically generated for you to test with right away and located in the root of the OSDCloud Template

<figure><img src="/files/X4KF67sjuEykReYCoDB9" alt=""><figcaption></figcaption></figure>

OSDCloud\_NoPrompt.iso will skip this message below and boot straight to WinPE

<figure><img src="/files/8lmx3sIiLKcDO0C8NyeU" alt=""><figcaption><p>OSDCloud.iso</p></figcaption></figure>


# Universal WinPE

OSDCloud Template contains a Universal WinPE that can be used with Microsoft Deployment Toolkit and Configuration Manager

If you were to boot the OSDCloud Template, you will see it looks virtually identical to the ADK WinPE

![](/files/-MWUld7RxBhcGha_BJfS)

## Universal WinPE Configuration

* wgl4\_boot.ttf is applied to Media to fix bad display resolution in WinPE UEFI
  * .\Media\boot\fonts\wgl4\_boot.ttf
  * .\Media\efi\microsoft\boot\fonts\wgl4\_boot.ttf
* ADK Packages are installed for .NET and PowerShell support
* Curl.exe is added to $MountPath\Windows\System32
* Setx.exe is added to $MountPath\Windows\System32
* WinPE PowerShell Execution Policy is set to Bypass
* PowerShell Gallery support is added
  * System Variables are added for APPDATA and LOCALAPPDATA
  * PackageManagement
  * PowerShellGet
* Microsoft DaRT is added to WinPE from C:\Program Files\Microsoft DaRT\v10\Toolsx64.cab
  * WinPE winpeshl.ini is removed
  * Microsoft DaRT Config is added from C:\Program Files\Microsoft Deployment Toolkit\Templates\DartConfig8.dat
* Console Registry Changes are applied to mounted Registry (ForceV2, Buffers)
* On Screen Keyboard

**As you can see, nothing OSD, OSDCloud, or OSDeploy has been added to the boot.wim.  This can easily be copied back into ADK for MDT or Config Manager (make a backup of you ADK winpe.wim)**

## On Screen Keyboard

![](/files/-MWjGkUJXVs5HmWbrZ4C)

### Microsoft DaRT

Requires "C:\Program Files\Microsoft DaRT\v10\Toolsx64.cab" and "C:\Program Files\Microsoft Deployment Toolkit\Templates\DartConfig8.dat"

![](/files/-MWQIqVnppecOZH5CW73)

![](/files/-MWQJ3x7-mPrDK_a5vDb)


# OSDCloud Workspace

OSD 23.5.21.1+ Updated May 21, 2023

Before getting too deep on how to create an OSDCloud Workspace, let me first explain what an OSDCloud Workspace is.  In a nutshell, an OSDCloud Workspace is a copy of the OSDCloud Template that you can customize with Configuration Files, Wallpaper, Drivers, and Startup Configuration.  Since it is a copy of your OSDCloud Template, this allows you to create multiple OSDCloud Workspaces that are customized with different configurations.  The best example I can give as to why you might need separate OSDCloud Workspaces is to keep one for Development and the second for Production


# Get-OSDCloudWorkspace

OSD 23.5.21.1+ Updated May 21, 2023

{% embed url="<https://github.com/OSDeploy/OSD/blob/master/Docs/Get-OSDCloudWorkspace.md>" %}
Online Help
{% endembed %}

It's a good idea to remember how to know what your current OSDCloud Workspace is.  You can find out with this function.  On a system that has never created an OSDCloud Workspace, you will receive the following Warning and nothing will be returned

```powershell
PS C:\> Get-OSDCloudWorkspace
WARNING: 2022-02-22-223047 Unable to locate C:\ProgramData\OSDCloud\workspace.json
```

Here is an example of how to test if you have an OSDCloud Workspace

```powershell
PS C:\> if (Get-OSDCloudWorkspace) {$true} else {$false}
WARNING: 2022-02-22-223256 Unable to locate C:\ProgramData\OSDCloud\workspace.json
False
```

Ideally, you should get a path returned if you have an OSDCloud Workspace

```powershell
PS C:\> Get-OSDCloudWorkspace
C:\OSDCloud
```

{% hint style="info" %}
The current OSDCloud Workspace is stored in the OSDCloud Template at `C:\ProgramData\OSDCloud\workspace.json`
{% endhint %}


# Set-OSDCloudWorkspace

OSD 23.5.21.1+ Updated May 21, 2023

{% hint style="info" %}
**This function requires elevated Admin Rights**
{% endhint %}

{% embed url="<https://github.com/OSDeploy/OSD/blob/master/Docs/Set-OSDCloudWorkspace.md>" %}
Online Help
{% endembed %}

The OSDCloud Workspace can also be set.  This is typically handled automatically when you create a new OSDCloud Workspace, but you can also set this with the **`Set-OSDCloudWorkspace`** function.  Here are some examples

```powershell
[ADMIN]: PS C:\> Get-OSDCloudWorkspace
C:\OSDCloud

[ADMIN]: PS C:\> Set-OSDCloudWorkspace C:\OSDCloudDev
C:\OSDCloudDev

[ADMIN]: PS C:\> Get-OSDCloudWorkspace
C:\OSDCloudDev

[ADMIN]: PS C:\> Set-OSDCloudWorkspace -WorkspacePath C:\OSDCloudProd
C:\OSDCloudProd

[ADMIN]: PS C:\> Get-OSDCloudWorkspace
C:\OSDCloudProd
```


# New-OSDCloudWorkspace

OSD 23.5.21.1+ Updated May 21, 2023

{% hint style="info" %}
**This function requires elevated Admin Rights**
{% endhint %}

{% embed url="<https://github.com/OSDeploy/OSD/blob/master/Docs/New-OSDCloudWorkspace.md>" %}
Online Help
{% endembed %}

This is the function that will create an OSDCloud Workspace from your active OSDCloud Template.  If you have multiple OSDCloud Templates, it's a good idea to check the one you are currently using and to change it if necessary.  In this example below I'm changing to a patched WinRE as my OSDCloud Template

```powershell
PS C:\> Get-OSDCloudTemplate
C:\ProgramData\OSDCloud\Templates\WinPE KB5026372

PS C:\> Get-OSDCloudTemplateNames
default
Public WinPE
Public WinPE KB5026372
Public WinRE
Public WinRE KB5026372
WinPE
WinPE KB5026372
WinPE Language en Dvorak
WinPE Language en es fr
WinPE Language fr en es
WinRE
WinRE KB5026372

PS C:\> Set-OSDCloudTemplate -Name 'WinRE KB5026372'
C:\ProgramData\OSDCloud\Templates\WinRE KB5026372
```

Now that I've checked my OSDCloud Template, I'll create a new OSDCloud Workspace.  By default, the OSDCloud Workspace is created at C:\OSDCloud but I can change the default by specifying a **`WorkspacePath`**

<figure><img src="/files/EdQLM4XE2qE9NzoDs0Dt" alt=""><figcaption></figcaption></figure>


# Restore from ISO

OSD 23.5.21.1+ Updated May 21, 2023

If you have an existing OSDCloud ISO, you can use this to create a new OSDCloud Workspace and the **`-fromIsoFile`** parameter.  Here is an example of how this works

![](/files/OOqmhCmPx5KVl2pmmYSS)


# Restore from ISO URL

OSD 23.5.21.1+ Updated May 21, 2023

If your existing OSDCloud ISO is saved on the Internet, then use the **`-fromIsoUrl`** parameter.  This will download the ISO, mount the ISO, create the OSDCloud Workspace, then dismount the ISO

![](/files/fZv9DPJ80R93ssspeIrB)


# Restore from USB

OSD 23.5.21.1+ Updated May 21, 2023

If you have an OSDCloud USB, you can use the **`-fromUsbDrive`** switch parameter to create the OSDCloud Workspace from the USB content

![](/files/mhDOnLRekFjUxDUPY0G3)


# Update-OSDCloudWorkspace


# Configuration Files

If you have any of the following OSDCloud Config Files, they can be added to your OSDCloud Template.  This will ensure that they are always copied to any newly created Workspace

## AutopilotJSON

Intune exported Autopilot Profiles can be copied to the following path

```
C:\ProgramData\OSDCloud\Config\AutopilotJSON
```

![](/files/-Mgj6k_151-g_ZcKkort)

## AutopilotOOBE

AutopilotOOBE configuration files can be copied into the following path

```
C:\ProgramData\OSDCloud\Config\AutopilotOOBE
```

## OOBEDeploy

OOBEDeploy configuration files can be copied into the following path

```
C:\ProgramData\OSDCloud\Config\OOBEDeploy
```


# OSDCloud WinPE

OSD 23.5.22.1+ Updated May 22, 2023

## Edit-OSDCloudWinPE

{% hint style="info" %}
**This function requires elevated Admin Rights**
{% endhint %}

{% embed url="<https://github.com/OSDeploy/OSD/blob/master/Docs/Edit-OSDCloudWinPE.md>" %}
Online Help
{% endembed %}

This is the function that is used to edit the WinPE in your OSDCloud Workspace.  The basic design of this function is to edit the Startnet.cmd in WinPE to perform a startup to run OSDCloud

In the example below, the default configuration starts WinPE with 3 windows

1. Startnet.cmd.  Closing this window will cause WinPE to restart
2. Normal PowerShell window.  This is where you should run you OSDCloud commands
3. Minimized PowerShell window.  This is a backup so you can run some commands while OSDCloud is running in the normal PowerShell window

<figure><img src="/files/U5MgEwMTS3DGLbHTrL0R" alt=""><figcaption></figcaption></figure>


# Default Wallpaper

OSD 23.5.22.1+ Updated May 22, 2023

## -UseDefaultWallpaper

This parameter will replace the default WinPE wallpaper with an OSDCloud Wallpaper

<figure><img src="/files/edNbzoMCMgEsQSFsLORZ" alt=""><figcaption></figcaption></figure>


# Wallpaper

OSD 23.5.22.1+ Updated May 22, 2023

## -Wallpaper

You can also specify your own JPG wallpaper for WinPE if you don't like mine

<figure><img src="/files/fge1brUKePOtBJ9ot7aI" alt=""><figcaption></figcaption></figure>


# Drivers

OSD 23.5.22.1+ Updated May 22, 2023

## CloudDriver

I spent some time automating the download, extraction, and injecting the drivers in OSDCloud's WinPE.  I call these CloudDrivers.  For this parameter I recommend you use install everything with the following command line&#x20;

```
Edit-OSDCloudWinPE -CloudDriver *
```

This will download and inject the following drivers

* Dell Enterprise Driver Cab
* HP WinPE 10 Driver Pack
* Intel Ethernet Drivers
* Lenovo Dock Drivers (Microsoft Catalog)
* Nutanix
* USB Dongles (Microsoft Catalog)
* VMware (Microsoft Catalog)
* WiFi (Intel Wireless Drivers) \[Requires WinRE]

These are handled by mixing and matching the following values

```
Edit-OSDCloudWinPE -CloudDriver Dell,HP,IntelNet,LenovoDock,Nutanix,USB,VMware,WiFi
```

Here's an example using Dell, USB, and Intel WiFi

```
Edit-OSDCloudWinPE -CloudDriver Dell,USB,WiFi
```

![](/files/WdGka6aLy7LmFmfHfzjF)

### DriverHWID

If you have a HardwareID, you can specify that with this parameter.  This will download the appropriate driver from Microsoft Catalog and inject it into WinPE.  Here's an example

```powershell
Edit-OSDCloudWinPE -DriverHWID 'VID_045E&PID_0927','VID_0B95&PID_7720'
```

![](/files/8aI0FLDbgtBjJBKeNRuz)

### DriverPath

Finally, you can use a Driver Path to specify a folder containing driver INF's that you want to install

```powershell
Edit-OSDCloudWinPE -DriverPath 'C:\SomePath'
```

![](/files/5uW8kS5sfrgEQlwhOgh7)


# PSModule

OSD 23.5.22.1+ Updated May 22, 2023

## PSModuleCopy

This parameter allows me to copy a PowerShell Module from my local computer to WinPE.  I use this frequently in testing an updated OSD Module that I'm working on before publishing it to PowerShell Gallery.  This parameter is also useful if you have your own custom PowerShell Modules that you do not publish in the PowerShell Gallery, but you need them in WinPE.  This is ideal for adding a custom OSDCloud GUI

<figure><img src="/files/zlNt2cK9sPQmDrbz6wtj" alt=""><figcaption></figcaption></figure>

## PSModuleInstall

If you want to add a PowerShell Module that is in the PowerShell Gallery, this parameter will download expand it into WinPE PowerShell Modules

<figure><img src="/files/YmxLsTTI8K0H5FS8vJOK" alt=""><figcaption></figcaption></figure>


# Startup

OSD 23.5.22.1+ Updated May 22, 2023

{% hint style="warning" %}
**Every time you run Edit-OSDCloudWinPE, even to add Drivers or change the Wallpaper, the WinPE Startup will reset to the Default**
{% endhint %}

## Default

The default for WinPE Startup is to open a PowerShell window.  This is the method I prefer as it gives me the flexibility to do anything I want, rather than to be locked into something specific.

```powershell
Edit-OSDCloudWinPE
```

<figure><img src="/files/6waAZHjQGrkq3tqDRZz0" alt=""><figcaption></figcaption></figure>

### WinPE Startnet.cmd

This is the Startnet.cmd when using the Default WinPE Startup configuration.  This is what is edited when you make one of the changes below

```batch
@ECHO OFF
wpeinit
cd\
title OSD 23.5.21.1
PowerShell -Nol -C Initialize-OSDCloudStartnet
@ECHO OFF
start PowerShell -NoL
```

<figure><img src="/files/5icCzUwymklqozXijlze" alt=""><figcaption></figcaption></figure>

## WinPE Startup Options

These are the available WinPE Start options that you can configure

<figure><img src="/files/a26yamFjzZRD8mZ97OH2" alt=""><figcaption></figcaption></figure>

## StartOSDCloudGUI

This parameter will automatically launch **`Start-OSDCloudGUI`**

```powershell
Edit-OSDCloudWinPE -StartOSDCloudGUI
```

<figure><img src="/files/8l0uGHyxsZtZIkmRCaZU" alt=""><figcaption></figcaption></figure>

## StartOSDCloudGUI -Brand

If you don't want OSDCloud displayed on the OSDCloud GUI, give it your own brand

```powershell
Edit-OSDCloudWinPE -StartOSDCloudGUI -Brand 'David Segura'
```

<figure><img src="/files/VuyRw6LJLDAyiVA4cmqu" alt=""><figcaption></figcaption></figure>

```powershell
Edit-OSDCloudWinPE -StartOSDCloudGUI -Brand 'HP'
```

<figure><img src="/files/WLRybUKLRZ4lAuXgfs4H" alt=""><figcaption></figcaption></figure>

## StartOSDCloud

Yes, WinPE can start OSDCloud (CLI) automatically using this parameter.  The value for this parameter need to be the parameters for Start-OSDCloud (CLI).  Here's an example:

{% code overflow="wrap" lineNumbers="true" fullWidth="false" %}

```powershell
Edit-OSDCloudWinPE -StartOSDCloud "-OSName 'Windows 10 21H2 x64' -OSLanguage en-us -OSEdition Pro -OSActivation Retail"
```

{% endcode %}

<figure><img src="/files/ybmb0hdOPXtyQM8AUdjB" alt=""><figcaption></figcaption></figure>

## StartURL

Here is a cool example of putting your Command Line into a GitHub Gist

{% embed url="<https://gist.github.com/OSDeploy/a0643dd05ccc3a95eba87559e66ce397>" %}

Then use the 'view raw' URL as the value for **`StartURL`**.  This is great way to customize the launch of your WinPE, or make some last minute changes.

<figure><img src="/files/2oc9q2ud50I8XwPoZNur" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/h5lajxsq4M7JTAczhQ81" alt=""><figcaption></figcaption></figure>

## StartOSDPad

{% hint style="info" %}
Example coming soon
{% endhint %}

## StartPSCommand

{% hint style="info" %}
Example coming soon
{% endhint %}

## Startnet

{% hint style="info" %}
Example coming soon
{% endhint %}


# OSDCloud ISO

OSD 23.5.22.1+ Updated May 22, 2023

## New-OSDCloudISO

{% hint style="info" %}
**This function requires elevated Admin Rights**
{% endhint %}

{% embed url="<https://github.com/OSDeploy/OSD/blob/master/Docs/New-OSDCloudISO.md>" %}
Online Help
{% endembed %}

If you have the Windows ADK installed, you can use `New-OSDCloudISO` to create bootable ISO Media for OSDCloud.  There are no parameters for this function

<figure><img src="/files/LZq7EYbjPl1AcZDJld6Z" alt=""><figcaption></figcaption></figure>

## Workspace

Two ISO's will be saved in your OSDCloud Workspace.  The NoPrompt ISO will boot automatically into WinPE without prompting for a keyboard press

![](/files/w1Q8yTpFMftDRfd8Zizi)


# OSDCloud USB

OSD 23.5.22.1+ Updated May 22, 2023


# New-OSDCloudUSB

OSD 23.5.22.1+ Updated May 22, 2023

{% hint style="info" %}
**This function requires elevated Admin Rights**
{% endhint %}

{% embed url="<https://github.com/OSDeploy/OSD/blob/master/Docs/New-OSDCloudUSB.md>" %}
Online Help
{% endembed %}

There are two reasons for creating an **OSDCloudUSB**.  The first reason is to simply boot to WinPE and let everything download from the Internet.  The second reason is to support OSDCloud Offline, which works without any internet connection at all

To create an OSDCloud USB, use the **`New-OSDCloudUSB`** OSD function.  This OSD Function is used for both **OSDCloud WinPE** and **OSDCloud Offline**

### Requirements

* [ ] Operating System - To create an OSDCloudUSB from a USB Drive, make sure you are running Windows 10 1703+ or Windows 11.  This minimum requirement is to create a USB Drive with 2 Partitions
* [ ] Admin Rights - Since you need to mess with Disk Partitions, you will need Admin Rights to Clear-Disk and New-Partition

### \[Default] fromWorkspace

To get started, open PowerShell with Admin rights.  Simply enter **`New-OSDCloudUSB`**&#x74;o prepare a new or used USB Drive

You will be presented with a table of the USB Drives that are present on your system, regardless of whether you have 1 or 5.  Simply enter the DiskNumber to make a selection

After selecting a DiskNumber, you will be prompted to Confirm the selection as this is a destructive process.  Once you Confirm, the USB Drive will be Cleared, Initialized, Partitioned, and Formatted.  When the USB Volumes are ready, your OSDCloud Media will be copied to the Boot partition.  The whole process should take between 1-2 minutes to complete

![](/files/SsE0ACMUYnIFNDxromLb)

### fromIsoFile

If you have an OSDCloud ISO, you can use this to create an OSDCloud USB using the **`-fromIsoFile`** parameter

![](/files/GFfiXMLgxyhsyZDJ6AdK)

### fromIsoUrl

If you have an ISO saved on the Internet, you may be able to use the **`-fromIsoUrl`** parameter

![](/files/cGMqjXLHeMpoDoN9cIRy)

{% hint style="warning" %}
This is not guaranteed to work in all situations due to firewall and proxy configuration
{% endhint %}

## USB Content

When you create a new OSDCloud USB, only the WinPE partition will contain files.  If you do not plan on using OSDCloud Offline, you can rename the OSDCloud partition and use it for something else

![](/files/fMixhhFT7q07VKSwJVoh)

## Disk Management

As you can see in Disk Management, the USB Drive will contain two partitions.  The first partition will be the OSDCloud NTFS partition, with the second being the 2GB FAT32 Partition.  Other guides may tell you to create the FAT32 partition first, but they are wrong, and I am right.  For one reason, FAT32 gets corrupted all the time.  Its easier to destroy and recreate at the end of the drive without messing with the NTFS partition.  Secondly, you are free to shrink and extend this smaller partition.  If the partitions were reversed, you would not be able to extend the start point of the second partition without losing all the NTFS data

![](/files/cAwKntK9AcK0awEXe8Kc)


# Update-OSDCloudUSB

OSD 23.5.22.1+ Updated May 22, 2023

{% embed url="<https://github.com/OSDeploy/OSD/blob/master/Docs/Update-OSDCloudUSB.md>" %}
Online Help
{% endembed %}

If you make changes to WinPE in your OSDCloud Workspace, you can easily update your OSDCloud USB WinPE volume by using **`Update-OSDCloudUSB`**

This OSD function easily works on multiple **OSDCloud USB** drives

![](/files/4eeZVm8nbBB3cclQMH0u)

## Update-OSDCloudUSB -DriverPack

If you are ready to use OSDCloud Offline, then you can start by adding Driver Packs for your supported computers using **`Update-OSDCloudUSB`** with the **`DriverPack`** parameter.  Supported manufacturers are Dell, HP, Lenovo, and Microsoft Surface

### ThisPC

You can start by downloading the Driver Pack for your computer.  Simply use the following command line

```powershell
Update-OSDCloudUSB -DriverPack ThisPC
```

![](/files/29CoO2speWshzunzazBg)

### Manufacturers

You can also specify one or more of the supported Manufacturers.  Each manufacturer specified will present a PowerShell GridView which will allow you to select multiple models.

Some models have Driver Packs for both Windows 10 and Windows 11.  In the Dell example below, both Driver Packs should be downloaded for proper compatibility.  During an OSDCloud deployment, Windows 11 Driver Packs are selected over Windows 10

```
Update-OSDCloudUSB -DriverPack Dell
```

![](/files/EWqpiXHgOY74YuDDoOQ7) ![](/files/KAF9vtktR4tY070rAHAJ)

The `DriverPack` parameter will accept multiple values, separated by a comma.  Additionally, Driver Packs that have already been downloaded will show as **Downloaded** in the **Status** column of PowerShell gridview

```
Update-OSDCloudUSB -DriverPack ThisPC,Dell
```

![](/files/WOR0PdN586WQ39TxxCn5)

### Everything

If you want to download the Driver Pack for your computer, and to select Driver Packs from all available Manufacturers, use this command

```
Update-OSDCloudUSB -DriverPack *
```

![](/files/6qFWPxsRD0qCvkVuUAaZ)

## Update-OSDCloudUSB -OS

Finally, you can save any Operating Systems (Windows 10 1809 - Windows 11 21H2) that OSDCloud uses to your OSDCloud USB.  You can download all OSDCloud supported Operating Systems with the following command line

```
Update-OSDCloudUSB -OS
```

Once Update-OSDCloudUSB runs, you will be prompted to select one or more Operating Systems from PowerShell gridview.  You can then press OK to download the ESD files

![](/files/iQqlmnu0DR8cPSZvYFWy)

### OSName

If you know which OS you want to download, you can use the **OSName** parameter with a supported value

![](/files/NiyNkPPSHs2PNBp80LIQ) ![](/files/wScbccEC5ntTiuQ44VrB)

### OSLanguage

In my opinion, the best filter that you can select is OSLanguage.  This will allow you select from all Operating Systems in your selected language

![](/files/vVtOwdEVPqqV47VvA58X)

### OSLicense

You can filter the `OSLicense` by `Volume` or `Retail` to narrow down the selections as well

![](/files/utMajVmITvux8KUZUCbi)


# USB Drives

There isn't a day that goes by that I get asked about what USB Drives should be used for **OSDCloud**, so let me get ahead of the apparent lack of curiosity and detail my findings anyway

![](/files/tIYKmxhZQ3EAbcvOHUhU)

## The Brand

For starters, when it comes to USB Drives, there are only two brands that I use, and that is Samsung and Sandisk, which are the #1 and #2 USB Flash Drive manufacturers respectively.  That said, Sandisk makes a considerable amount of ~~junk~~ budget USB Flash Drives, so the only Sandisk USB Flash Drive that I can recommend is the Extreme Pro

## Size Matters

When it comes to USB Flash Drives, the general rule is that larger is better.  This is because a larger capacity USB Flash Drive has more channels of memory that run in parallel

## Read and Write Testing

I tested each of these drives by creating OSDCloud Offline using Update-OSDCloud.usb.  This command was used to copy Windows 11 VOL (3.46GB) and the Lenovo P17 Driver Pack (1.06GB) for a total of 4.53GB.  Keep in mind WRITE speeds are slower (creating the USB) then the READ speeds (deploying from USB), so there shouldn't be much difference in an OSDCloud deployment since only the copying of the OS and DriverPack to the OSDisk wlil be the only change.  In plain english, the Deployment times consisted of preparing OSDisk, copying the OS and Driver Pack, and expanding the OS.  Of that 2 minutes, only about 5-15 seconds were dependent on the USB Drive speed

## Samsung USB Flash Drives

Samsung makes three USB Drives that can work equally well with booting to WinPE or imaging using OSDCloud.  Each of these drives have a specific purpose, and they are quite inexpensive.  You can find the 32GB drives for about $10, and the 256GB at $40.  The price difference between the 32GB and 64GB is about $3, so I'd opt for the 64GB as the sweet spot.  If speed is important, go with the 256GB.

### Samsung BAR Plus USB 3.1 64GB

This is absolutely the most durable USB Drive that Samsung makes.  You won't break this drive, ever.  Additionally, it is as wide as the USB-A port it plugs into, meaning it will not block any other ports when connected to your computer.  Finally, it has a hole so this can be attached to a keychain.  While the write speeds seemed slow in my example below, this is due to the size tested.  at 64GB, it is 4 x smaller than the other Samsung drives.  If this were a 256GB, I would expect it to perform identically to the other Samsung drives.

| Create (WRITE)       | Deploy (READ)       |
| -------------------- | ------------------- |
| 2 minutes 45 seconds | 2 minutes 2 seconds |

{% embed url="<https://www.samsung.com/us/computing/memory-storage/usb-flash-drives/usb-3-1-flash-drive-bar-plus-64gb-champagne-silver-muf-64be3-am>" %}

### Samsung FIT Plus USB 3.1 256GB

While the Samsung BAR is my favorite for general use, when I am writing code to create USB Drives, I enjoy using the Samsung FIT.  This is because it fits almost flush with my computer, so there isn't much sticking out to get snagged on anything, or to get bent and broken.  This form factor is best used for leaving in a USB port for an extended amount of time.

| Create (WRITE) | Deploy (READ)       |
| -------------- | ------------------- |
| 53 seconds     | 1 minute 57 seconds |

{% embed url="<https://www.samsung.com/us/computing/memory-storage/usb-flash-drives/usb-3-1-flash-drive-fit-plus-256gb-muf-256ab-am>" %}

### Samsung DUO Plus USB 3.1 256GB

I'm only going to recommend this USB Drive if you need it for USB-C, but in all honestly, use a USB-A drive with a USB-C hub or dock.  This USB drive is all plastic and it comes in three pieces.  The USB Drive, a USB-C cap, and a USB-C to USB-A adapter.  You're going lose one or two of these, and you are certain to break the USB drive after some extended use.

| Create (WRITE) | Deploy (READ)      |
| -------------- | ------------------ |
| 51 seconds     | 2 minutes 1 second |

{% embed url="<https://www.samsung.com/us/computing/memory-storage/usb-flash-drives/usb-3-1-flash-drive-duo-plus-256gb-muf-256db-am>" %}

## Sandisk USB SSD

### Sandisk Extreme Pro USB 3.2 256GB

This isn't a Flash Drive like the Samsung drives, this is a legit SSD.  While this sounds great, it will demand a $20 premium over the equivalent Samsung drives.  When imaging a computer, you won't notice much difference, but when you are writing to the drive, it should be twice as fast.

Sadly, while I love the speed of this drive, it is much larger than the Samsung drives.  Additionally, the smoothness of the drive make it hard to get a grip when removing.  Finally, I own three of these drives.  The first was damaged because it got bent when I was trying to remove it, the second is headed to the same fate.  At $60 a pop for 256GB, it won't last longer than the Samsung BAR or FIT.  Pass on this USB Drive.

| Create (WRITE) | Deploy (READ)       |
| -------------- | ------------------- |
| 27 seconds     | 1 minute 51 seconds |

{% embed url="<https://www.westerndigital.com/products/usb-flash-drives/sandisk-extreme-pro-usb-3-2#SDCZ880-256G-A46>" %}

## Conclusion

If you need an USB Drive to boot WinPE, I can only recommend the Samsung USB Drives or Sandisk Extreme Pro, but pick a drive that best suits your purpose

* **Samsung BAR - Rugged.  Ideal for general purpose**
* Samsung FIT - for Development and Long Term use
* Samsung DUO - for USB-C only
* Sandisk Extreme Pro - Don't do it


# Secure USB Drives

If you plan on keeping secure content on your OSDCloud USB, then you should absolutely use a Secure Drive.  I'll add to this page if I come across any other drives that will do, but so far, I have only found one, the Samsung S7 Touch which uses up to 4 Fingerprints to secure the content

## Samsung S7 Touch (500GB - 2TB)

You can skip reading the rest of this page because this is absolutely the USB Drive you should be using for OSDCloud.  This drive is portable, fast, and compatible with both USB-A and USB-C, so it should work on every device in your environment.  Additionally, this USB Drive has a fingerprint sensor to keep things secure.  Finally, once unlocked, this USB Drive is bootable, which makes it perfect for booting to WinPE and using OSDCloud

![](/files/7c1ZFVZXpXEfAAsxdQ9J) ![](/files/C8fCiG1wa00toiZg3N60)

You can read more about this drive from Samsung's website at the following link

{% embed url="<https://www.samsung.com/us/computing/memory-storage/portable-solid-state-drives/portable-ssd-t7-touch-usb-3-2-500gb-silver-mu-pc500s-ww>" %}

## Software Installation

Before this drive can be used securely, you need to setup the Samsung PortableSSD software on a computer.  The software that you need to install is on the drive itself, and can be installed on Windows, as well as Mac and Android

![](/files/NLwemxsbsPB7LXi3nq5J) ![](/files/g1BCJJwziX9iNowBxMKc)

There isn't much to the Windows software, just do your best pressing Next

![](/files/ehSVdCMv6TLYimrb2Lee) ![](/files/ZrtS16i23aVefAW9kGf5)

## Software Configuration

Once the Samsung PortableSSD software is installed, you will need to configure it before the fingerprint sensor will work.  The absolute first thing to check is for Software updates (which may also include Drive Firmware).  One that is complete, you can rename the Drive (I chose my phone number) and enable **Security with Password and Fingerprint**

After setting a Password (I chose a 4-digit PIN) and then scanned my first Fingerprint, my Right Index.  While I could have used any fingerprint, using your Index Finger instead of your Thumb allows you to hold the drive if necessary to get the job done.  You can register up to 4 Fingerprints, which comes in handy if you work in a small team imaging devices.

One important thing to note is that the Password (PIN) allows you to register Fingerprints, so the Password (PIN) can be used to Administer the Drive.  You can't register a new Fingerprint without the Password (PIN)

![](/files/FyQTCSRalaKAvBr2WitH) ![](/files/ix2tNvP5wIZgHtnRWfG0) ![](/files/CyrTRf1wFa5NbL8uwQdG) ![](/files/MrKyE5OfDx9L9kzbshLf) ![](/files/Mu5Pyh105c37YPvUWULq) ![](/files/pHBMx2iFzQggG42DF5Ns) ![](/files/PBloTrJ647L4krsBMB9h)

## OSDCloud Setup

Once you have your Fingerprint setup on the S7 Touch, make sure it is unlocked and run `New-OSDCloud.usb` in PowerShell.  This will wipe the S7 Touch and create WinPE and Data partitions.  You can also run other commands to get OS Images and Driver Packs on the USB Drive.  The following links will get you started

{% content-ref url="/pages/-MW3CFn415hdh7ZF4s94" %}
[New-OSDCloudUSB](/osdcloud-v1/osdcloud/setup/osdcloud-usb/new-osdcloudusb)
{% endcontent-ref %}

![](/files/qk3cjidBkOtfY9EL4G0S) ![](/files/l4b8meebI6zvIr4N5pjH) ![](/files/KDOCFGtfdGmlRuvHGj9b)

As you can see from the above image, copying the Windows 11 ESD and a Lenovo DriverPack took 8 seconds (27 seconds with the Sandisk Extreme Pro (USB SSD) and 51 seconds with the Samsung (USB Flash)

| Create (WRITE) | Deploy (READ)       |
| -------------- | ------------------- |
| 8 seconds      | 1 minute 50 seconds |


# OSDCloud VM

OSD 23.5.28.1+ Updated May 29, 2023

{% hint style="warning" %}
**This page is under construction and the update hasn't even been released, so there is nothing you can do yet.  Be patient**
{% endhint %}

Let's have an intimate conversation about Hyper-V and OSDCloud.  For starters, I do almost all of my testing in Hyper-V on my Workstation, and I've been creating Virtual Machines hundreds of times ... all of that wasted time.  So how about automating this process for OSDCloud

## Admin Rights

Let's start with the obvious, you will need Admin Rights.  You won't even see the **`New-OSDCloudVM`** function without it.  Got it?

<figure><img src="/files/bb8H6G0zBRqTz2xsfmhW" alt=""><figcaption></figcaption></figure>

## Hyper-V

Get your Hyper-V in working order.  This is a new function, and I don't have all the checks in place so expect things to go sour if you haven't at least created a Virtual Machine

## Workspace

Your OSDCloud Workspace should be in good order as well.  You can easily check this with **`Get-OSDCloudWorkspace`**.  What is important to know is that OSDCloud VM uses the OSDCloud\_NoPrompt.iso to boot.

If you need to change your OSDCloud Workspace, use the **`Set-OSDCloudWorkspace`** function

<figure><img src="/files/btYw4LK8B8bItE0OhVN6" alt=""><figcaption></figcaption></figure>


# Get-OSDCloudVMDefaults

OSD 23.5.28.1+ Updated May 29, 2023

There function is used to return the OSDCloudVM defaults.  The defaults are set in the OSD Module by importing the settings from the **`OSD.json`** file that exists in the root of the OSD Module.  This file cannot be changed

<figure><img src="/files/jPtI3xUm6Yz6cChImqM1" alt=""><figcaption></figcaption></figure>

When creating a new OSDCloud VM, these defaults will be used to create the Virtual Machine.  Most of the values used are defaults that are required for Windows 11, although I would recommend using more powerful settings if your system can handle it.  The defaults represent the Minimum level that should be used with an OSDCloud VM

```json
{
  "CheckpointVM": true,
  "Generation": 2,
  "MemoryStartupGB": 4,
  "NamePrefix": "OSDCloud",
  "ProcessorCount": 1,
  "StartVM": true,
  "SwitchName": null,
  "VHDSizeGB": 64
}
```

<figure><img src="/files/FaODxAmHo6rRqPsM5d21" alt=""><figcaption></figcaption></figure>


# Get-OSDCloudVMSettings

OSD 23.5.28.1+ Updated May 29, 2023

While you can't change the OSDCloud VM Defaults as those are OSD Module based, you can add OSDCloud VM Settings that overlay over the OSDCloud VM Defaults.  Using the **`Get-OSDCloudVMSettings`** function, you are able to see the current effective settings that are a combination of the following.  In this design, the last entry wins

1. OSD Module Defaults
2. OSDCloud Template Settings
3. OSDCloud Workspace Settings

If you have not made any changes to the Template or Workspace Settings, the current settings should mirror the OSD Module Defaults

<figure><img src="/files/zpeK7XvicsGyciFIpwjZ" alt=""><figcaption></figcaption></figure>


# Set-OSDCloudVMSettings

OSD 23.5.28.1+ Updated May 29, 2023

Using this function, you can use Parameters to change the OSDCloud VM Template settings.  This creates a configuration file that is imported every time you create an OSDCloud VM.  In the example below I have changed the Memory from 4GB to 10GB, the Processor Count from 1 to 2, and set the Switch from 'No connection' to 'Default Switch' using the following commands

```
Set-OSDCloudVMSettings -MemoryStartupGB 10 -ProcessorCount 2 -SwitchName 'Default Switch'
```

**`Get-OSDCloudVMSettings`** will show the updated values and the inclusion of the configuration file

<figure><img src="/files/FZ7DvNJHgqjKWPfKbHt0" alt=""><figcaption></figcaption></figure>

New-OSDCloudVM will show when Settings are being used, resulting in an OSDCloud VM being created with the updated Settings &#x20;

<figure><img src="/files/Nm1M7CUqvqFbSBjavBD7" alt=""><figcaption></figcaption></figure>


# Reset-OSDCloudVMSettings

OSD 23.5.28.1+ Updated May 29, 2023

You can reset the OSDCloud VM Settings to the OSD Module defaults using this function.  It will simply delete all configuration files

<figure><img src="/files/oUCfHEoVtVLIfvRRD75k" alt=""><figcaption></figcaption></figure>


# New-OSDCloudVM

OSD 23.5.28.1+ Updated May 29, 2023

You can customize the defaults of the Virtual Machine by using the parameters of this function.  When you change any of the parameters, it will save the configuration in the OSDCloud Workspace.  Every subsequent OSDCloud VM that you create in the same OSDCloud Workspace will use these settings.  In this example I have set my OSDCloud VM Settings (Template) with the following configuration

<figure><img src="/files/FVZh83grOX0fRlrdmXDr" alt=""><figcaption></figcaption></figure>

## First Run

When I run **`New-OSDCloudVM`**, it will inherit my OSDCloud VM Settings that were created in my OSDCloud Template by **`Set-OSDCloudVMSettings`**

<figure><img src="/files/iMT0DeDnYwa1moHKvMxc" alt=""><figcaption></figcaption></figure>

## SwitchName

This should absolutely be one of the first things you set in your Virtual Machine.  Ideally it should be inherited from Set-OSDCloudVMSettings

And yes, you will be able to Tab Complete through your available Virtual Switches

<figure><img src="/files/xDWNX6JcrumqV4hsRKA5" alt=""><figcaption></figcaption></figure>

If you need your VM set to 'Not connected', just use a **`$null`** value

<figure><img src="/files/yBT3mjHPccME2uZOWeDM" alt=""><figcaption></figcaption></figure>

## StartVM

By default, OSDCloud VM will startup automatically.  I can prevent this from happening by using this parameter and setting the value to **`$false`**

<figure><img src="/files/YrzS7JRAR7CcOkJZrAPN" alt=""><figcaption></figcaption></figure>

## CheckpointVM

This value determines if a New VM Checkpoint will be created or not, which is incredibly helpful if you need to reset the VM to a clean state.  You can change this at the command line as well

<figure><img src="/files/wATeJoUk0eninofn3kjp" alt=""><figcaption></figcaption></figure>

## NamePrefix

This Prefix is given to the Virtual Machine name created with **`New-OSDCloudVM`**.  By default, this is **OSDCloud**, but you can also configure this at the command line

<figure><img src="/files/RcQ0o9hW8oWIQ0GElQLG" alt=""><figcaption></figcaption></figure>

## Generation

By default, the VM will be created as Generation 2, which is UEFI.  But if you want to live in a world of pain, you can create a Generation 1 Virtual Machine.

{% hint style="danger" %}
**Seriously don't do this.  OSDCloud will partition your disk as GPT, which won't boot your Generation 1 VM.  This feature was added for testing only.  I will not address any questions about this parameter, so you're on your own here.**
{% endhint %}

<figure><img src="/files/y8UsDYau2Pfv3jRRltp8" alt=""><figcaption></figcaption></figure>

## MemoryStartupGB

The minimum requirements for Windows 11 are 4GB, but I've seen some things not work right, so I suggest bumping this up a little

<figure><img src="/files/p5WrJokqRiuCBvirXhG0" alt=""><figcaption></figcaption></figure>

## ProcessorCount

I recommend setting this to at least 2, but that's your call.

<figure><img src="/files/fsSwZ5m22R6EM10D6AFh" alt=""><figcaption></figcaption></figure>

If you are curious as to how many processors you can use at the same time across all Virtual Machines ...

<figure><img src="/files/z4MZLUU1bIXF1KsDjZI6" alt=""><figcaption></figcaption></figure>

Can you create a Virtual Machine with a Processor Count greater than the number of Processors?  Yes you can, but you'll have problems getting it to start

<figure><img src="/files/JtynTjssVWK0STtpn7ye" alt=""><figcaption></figcaption></figure>

## VHDSizeGB

Finally feel free to give your Virtual Machine a few extra GB's of space.  Enjoy!

<figure><img src="/files/cz1Sj5su5vMA9XNo4CCb" alt=""><figcaption></figcaption></figure>

## Final Words

As a reminder, you can reset things back to default if you need to

<figure><img src="/files/VLeR62SZeCdPX0w39mVa" alt=""><figcaption></figcaption></figure>

A TimeStamp is used in the Virtual Machine Name so you should always be able to quickly identify the last one you created.  Finally, if you have a failed deployment, you can Apply the initial Checkpoint to reset the Virtual Machine to a newly created state

<figure><img src="/files/NurhYMlOXg7Yi9FwI8jK" alt=""><figcaption></figcaption></figure>


# Deployment

OSD 23.5.21.1+ Updated May 21, 2023


# WinPE

OSD 23.5.21.1+ Updated May 21, 2023


# Start-OSDCloud

OSD 23.5.21.1+ Updated May 21, 2023

{% embed url="<https://github.com/OSDeploy/OSD/blob/master/Docs/Start-OSDCloud.md>" %}

This is the OSDCloud Command Line which is useful for scripting.  Parameters are optional, but you will be prompted to make Operating System selections

<figure><img src="/files/Bt4syLLCNs5eHtR5jRj5" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/ZRAsw9qqhzIBLTZMpUuK" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/wckbJ7NZH6MM8FZXeKAz" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/2g1MBll3iOGM5ZNH4NHa" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/xptsrIpu1WcTy7ODldrS" alt=""><figcaption></figcaption></figure>


# OS Parameters

OSD 23.5.21.1+ Updated May 21, 2023

You can specify Operating System parameters so you can deploy without being prompted for a selection

<figure><img src="/files/fSXyuAqRY1AKZVuf4zDP" alt=""><figcaption></figcaption></figure>


# ZTI

OSD 23.5.21.1+ Updated May 21, 2023

The ZTI Parameter will automatically deploy using the defaults for any Operating System parameters that are not specified.  You will not be prompted to confirm the Clear-Disk

<figure><img src="/files/alnzJsRbR3fw8QNKJmd5" alt=""><figcaption></figcaption></figure>


# Start-OSDCloudGUI

OSD 23.5.21.1+ Updated May 21, 2023

{% embed url="<https://github.com/OSDeploy/OSD/blob/master/Docs/Start-OSDCloudGUI.md>" %}

After WinPE startup is complete, enter **`Start-OSDCloudGUI`** at the PowerShell prompt

<figure><img src="/files/EHo2h1HHI6GXBAp2P2rf" alt=""><figcaption></figcaption></figure>

You will briefly see the OSDCloudGUI Configuration and the TPM/Autopilot status before this PowerShell window is minimized

<figure><img src="/files/rxXgRnd7SgYdYz8XSJqW" alt=""><figcaption></figcaption></figure>

## Operating System

You can select an Operating System from the combobox.  The default Operating System will always be the latest, which is currently Windows 11 22H2 x64

<figure><img src="/files/qMLXyqfplZbAPhb03SVR" alt=""><figcaption></figcaption></figure>

Currently, there are 760 Operating System combinations (OS, Language, Activation) that are available which you can review using the **`Get-OSDCloudOperatingSystems`** function

<figure><img src="/files/MiD0ft03gnSK8Lgk9I8Q" alt=""><figcaption></figcaption></figure>

## Edition

The Windows Edition is set to **Enterprise** by default

<figure><img src="/files/koDTYnCRvNyjB1aCgdL8" alt=""><figcaption></figcaption></figure>

## Language

The Windows Language is set to **en-us** by default

<figure><img src="/files/9wWsbxR0x3lKuwQTJI90" alt=""><figcaption></figcaption></figure>

## Activation (License)

The Windows Activation is set to Volume by default due to the default Windows Edition being set to Enterprise

<figure><img src="/files/isdKcIksZUlN5t51wb0p" alt=""><figcaption></figcaption></figure>

## DriverPack

Depending on the Computer Model and Operating System, a Driver Pack will automatically be selected for you.  In the case of a Virtual Machine or an unknown Computer Model, Microsoft Update Catalog will be selected.  You can also select None for a DriverPack if you would prefer to go a different route

<figure><img src="/files/vKHjECeV8tMFF7D9Rifi" alt=""><figcaption></figcaption></figure>

## Deployment Options

By default, you will need to confirm the Clear-Disk operation during a deployment.  You can unselect this requirement from the Deployment Options menu.  After the deployment is complete, the computer will automatically restart.  This can be disabled from this menu

{% hint style="warning" %}
capture Screenshots isn't working at this time
{% endhint %}

<figure><img src="/files/N5irt9Vv6AuuzvnfaEhw" alt=""><figcaption></figcaption></figure>

## Microsoft Update Catalog

Disk, Network, and SCSI Adapter drivers will be downloaded from Microsoft Update Catalog by default.  Optionally, you can download Firmware updates for your device

<figure><img src="/files/NCXd2xy30RLX3MtK4E8w" alt=""><figcaption></figcaption></figure>

## Start

When you are ready to deploy, press the Start button.  You should get prompted to confirm the Clear-Disk step

<figure><img src="/files/F5sK19MhuORc1nhjb7wi" alt=""><figcaption><p>Clear-Disk Confirm</p></figcaption></figure>

The Operating System ESD will be downloaded from Microsoft

<figure><img src="/files/0Zsl9vA2tU5up0boEff5" alt=""><figcaption></figcaption></figure>

Once the ESD has been downloaded, it is expanded to C:\\

<figure><img src="/files/t9hvcQIv087onGJYTnCW" alt=""><figcaption></figcaption></figure>

The DriverPack will be expanded in WinPE, or staged for first boot.  PowerShell Modules that are required for Autopilot will be updated in the offline Operating System

<figure><img src="/files/gBcBSiXTjwz22315WLG3" alt=""><figcaption></figcaption></figure>

Finally, the computer should reboot to OOBE.  At this point, OSDCloud is complete

<figure><img src="/files/t2t54pcXTChVWJs4t4v0" alt=""><figcaption></figcaption></figure>


# Parameters

OSD 23.5.21.1+ Updated May 21, 2023

This is the default OSDCloudGUI.  There are a few parameters that you can use for minimal customization

<figure><img src="/files/cZFXfO481EhcxAwadJVv" alt=""><figcaption></figcaption></figure>

## -BrandName

Change the Brand Name

```powershell
Start-OSDCloudGUI -BrandName 'MMSMOA2023'
```

<figure><img src="/files/9YsPqfwFeIpeS9vzoOVF" alt=""><figcaption></figcaption></figure>

## -BrandColor

Change the Brand Color

```powershell
Start-OSDCloudGUI -BrandColor '#ED1C24'
```

<figure><img src="/files/t9A3cjeBsJ0S2ytnH7ir" alt=""><figcaption></figcaption></figure>

## -ComputerManufacturer

This parameter is helpful in testing Manufacturer customizations in a Virtual Machine.  You can see the Manufacturer displayed in the Title Bar

```powershell
Start-OSDCloudGUI -ComputerManufacturer 'HP'
```

<figure><img src="/files/aXd1romRIZx1TDLdQ6SE" alt=""><figcaption></figcaption></figure>

## -ComputerProduct

OSDCloud matches the Driver Pack based on the computer Product.  This parameter is helpful for testing a Driver Pack on a Virtual Machine.  You can see the Computer Product displayed in the Title Bar

```powershell
#HP Dragonfly G2
Start-OSDCloudGUI -ComputerProduct '8716'
```

<figure><img src="/files/qrOzEdaDFFuKMWgvDx67" alt=""><figcaption></figcaption></figure>


# Defaults

OSD 23.5.21.1+ Updated May 21, 2023

`Start-OSDCloudGUI` has some defaults that are set using the `$OSDCloudModuleResource` Global Variable.  These are initialized when the OSD PowerShell Module is imported.

<figure><img src="/files/Lis3rIKvXCYAclXsxcqp" alt=""><figcaption></figcaption></figure>

These variables can be modified before launching Start-OSDCloudGUI

<figure><img src="/files/4NIPCUYR88lGnr1rSAcb" alt=""><figcaption></figcaption></figure>


# Global Variable

OSD 23.5.21.1+ Updated May 21, 2023

When you run `Start-OSDCloudGUI`, all of the settings are stored in the `$OSDCloudGUI` Global Variable.  `Invoke-OSDCloud` digests this Global Variable when you press the Start button

<figure><img src="/files/ZPTgVFxRGOQB7a3nMqfL" alt=""><figcaption></figcaption></figure>


# Customize

OSD 23.5.21.1+ Updated May 21, 2023

<figure><img src="/files/tfkTbyxpnR3vDISflY5G" alt=""><figcaption></figcaption></figure>


# Start-OSDCloud Wrapping

OSDCloud is heavily variable driven, similar to a ConfigMgr Task Sequence.

There are many variables in OSDCloud to control the process, similar to running OSDCloud with parameters to control a small set of the variables, you can script around Start-OSDCloud to configure so much more to get the exact zero touch scenario you're looking for.

Start-OSDCloud has about 60 variables in the Start-OSDCloud script beginning that are set, but along the way, several others can be used as well, which can be consumed by the OSDCloud engine which at last check, has about 130 variables. &#x20;

At the start of the OSDCloud engine, it has a default set for these variables, then it looks at what you sent along the way with Start-OSDCloud, and it overwrites the defaults with the variables you set, but if you manually set any variables ahead of time using the global variable "MyOSDCloud", it will overwrite any previous variables with what you've set in that variable, I hope you're all tracking. Let's look at an example.

NOTE: See Start-OSDCloudGUI -> Global Variable for additional details

By Default, there is a $Global:OSDCloud variable with several sub keys, once of which is "OSVersion", which is set to "Windows 10" by default.  If I run Start-OSDCloud with some parameters, I can see that a new Global variable $Global:StartOSDCloud is created with the information I just fed into it:

<figure><img src="/files/zHEhNSSu6Si1FFuvwNzJ" alt=""><figcaption><p>OSDCloud Default Variables, OSVersion set to 'Windows 10'</p></figcaption></figure>

<figure><img src="/files/qr3Noiw4fpBW27tE8iJb" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/xOL26r00Hi8rQYfnzEQC" alt=""><figcaption></figcaption></figure>

So now when OSDCloud runs, it will overwrite the defaults in $Global:OSDCloud with the ones in $Global:StartOSDCloud, updating $Global:OSDCloud.OSVersion from "Windows 10" to "Windows 11"

<figure><img src="/files/Hgzd5lB0vCBTX2nApabt" alt=""><figcaption></figcaption></figure>

So, from this small example, you can see how OSDCloud overwrites the defaults with the variables you're setting along the way using parameters, but that's just one way to set them.  The GUI? It's really just a front end that allows you to set several variables using a GUI interface.  Each drop down and check box maps directly to a variable.

Now we're finally getting to the good part, this is how I have automated several unique experiences based on a simple PowerShell wrapper file that gets called.  Lets look at some code examples.  For instance, I have a Windows 11 wrapper script that sets several items and calls OSDCloud

```
#Variables to define the Windows OS / Edition etc to be applied during OSDCloud
$OSName = 'Windows 11 23H2 x64'
$OSEdition = 'Pro'
$OSActivation = 'Retail'
$OSLanguage = 'en-us'

#Set OSDCloud Vars
$Global:MyOSDCloud = [ordered]@{
    Restart = [bool]$False
    RecoveryPartition = [bool]$true
    OEMActivation = [bool]$True
    WindowsUpdate = [bool]$true
    WindowsUpdateDrivers = [bool]$true
    WindowsDefenderUpdate = [bool]$true
    SetTimeZone = [bool]$true
    ClearDiskConfirm = [bool]$False
    ShutdownSetupComplete = [bool]$false
    SyncMSUpCatDriverUSB = [bool]$true
    CheckSHA1 = [bool]$true
}

#Launch OSDCloud
Write-Host "Starting OSDCloud" -ForegroundColor Green
write-host "Start-OSDCloud -OSName $OSName -OSEdition $OSEdition -OSActivation $OSActivation -OSLanguage $OSLanguage"

Start-OSDCloud -OSName $OSName -OSEdition $OSEdition -OSActivation $OSActivation -OSLanguage $OSLanguage
```

When I trigger that script, it launches OSDCloud with the OS I want deployed, and presets several variables that are in the Global:MyOSDCloud variable.&#x20;

<figure><img src="/files/8x08I1o1HAruaRCZOiZa" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/YrQ5im1loE7jaHz70gcp" alt=""><figcaption></figcaption></figure>

You can see the variables in my script have been merged into the $global:OSDCloud variable

<figure><img src="/files/bCLukzjIktkohEvc5o2n" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/LlBt1milcKa5zzglqc5X" alt=""><figcaption></figcaption></figure>

I keep a few variations of my wrapper scripts in GitHub, which I then call and based on hardware models, will also set additional variables, like for HP, I have it update TPM, BIOS, and run HPIA to update Drivers during Setup Complete.  <br>

As all of the available variables do change, I'm not going to list them here, but feel free to look at things in the code in the module to see a full list.  If you'd ever like to see my of my examples, please reach out via Discord (WinAdmins) or X - @gwblok


# First Boot

OSD 23.5.21.1+ Updated May 21, 2023

During First Boot (Specialize Phase), any EXE based DriverPacks in C:\Drivers will be expanded.  Once expanded, they will be applied using the following PowerShell commands

```powershell
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths" -Name 1 -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" -Name Path -Value $DestinationPath -Force
pnpunattend.exe AuditSystem /L
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" -Recurse -Force
```

You can identify this phase by the "Getting ready"&#x20;

<figure><img src="/files/A70YAPmke5EAvdMvt16k" alt=""><figcaption></figcaption></figure>

## Dell Systems

Dell uses CAB files or EXE files that can be expanded in WinPE, so there is no activity in First Boot other than a long delay.  You can review the logs in C:\Windows\debug

```powershell
Start-Process -FilePath $ExpandFile -ArgumentList "/s /e=`"$DestinationPath`"" -Wait

Write-Verbose -Verbose "$((Get-Date).ToString('yyyy-MM-dd-HHmmss')) Applying DriverPack with PNPUNATTEND"
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths" -Name 1 -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" -Name Path -Value $DestinationPath -Force
pnpunattend.exe AuditSystem /L
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" -Recurse -Force
```

## HP Devices

HP DriverPacks are silent, so there is no progress displayed during this phase other than a long delay.  You can review the logs in C:\Windows\debug

```powershell
Start-Process -FilePath $ExpandFile -ArgumentList "/s /e /f `"$DestinationPath`"" -Wait

Write-Verbose -Verbose "$((Get-Date).ToString('yyyy-MM-dd-HHmmss')) Applying DriverPack with PNPUNATTEND"
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths" -Name 1 -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" -Name Path -Value $DestinationPath -Force
pnpunattend.exe AuditSystem /L
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" -Recurse -Force
```

<figure><img src="/files/UAYeymVQd7pN2at9E9FN" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/DMoK1hCXVU12jVKYdtM7" alt=""><figcaption></figcaption></figure>

## Lenovo Devices

Lenovo devices will display a progress when the DriverPacks is expanded

```powershell
Start-Process -FilePath $ExpandFile -ArgumentList "/SILENT /SUPPRESSMSGBOXES" -Wait

Write-Verbose -Verbose "$((Get-Date).ToString('yyyy-MM-dd-HHmmss')) Applying DriverPack with PNPUNATTEND"
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths" -Name 1 -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" -Name Path -Value $DestinationPath -Force
pnpunattend.exe AuditSystem /L
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" -Recurse -Force
```

<figure><img src="/files/YmoGtfFrsyTraFF9s7Z1" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/ipNP8NObBEMmzO0dckYR" alt=""><figcaption></figcaption></figure>

## Microsoft Surface Devices

Microsoft uses MSI DriverPacks which expanded silently, so there is no activity in First Boot other than a long delay.  You can review the logs in C:\Windows\debug&#x20;

```powershell
$DateStamp = Get-Date -Format yyyyMMddTHHmmss
$logFile = '{0}-{1}.log' -f $ExpandFile,$DateStamp
$MSIArguments = @(
	"/i"
	('"{0}"' -f $ExpandFile)
	"/qb"
	"/norestart"
	"/L*v"
	$logFile
)
Start-Process "msiexec.exe" -ArgumentList $MSIArguments -Wait -NoNewWindow
```


# OOBE

OSD 23.5.21.1+ Updated May 21, 2023

<figure><img src="/files/9gKSoxSX9A9B7ySJXIOr" alt=""><figcaption></figcaption></figure>


# Windows

OSD 23.5.21.1+ Updated May 21, 2023

## Drivers

DriverPacks are downloaded and expanded to C:\Drivers.  This directory is not removed when an OSDCloud deployment is complete

<figure><img src="/files/fFZaRPAakWKSfq1CI0tM" alt=""><figcaption></figcaption></figure>

## Logs

Logs can be found in C:\OSDCloud\Logs.  This directory is not removed when an OSDCloud deployment is complete

<figure><img src="/files/QMHKOTTRAkQwmNW34JBg" alt=""><figcaption></figcaption></figure>

## Windows Image

The Windows Image that was downloaded can be found in C:\OSDCloud\OS.  This directory is not removed when an OSDCloud deployment is complete

<figure><img src="/files/Ni5ALqX8L8IXZrHPjlfu" alt=""><figcaption></figcaption></figure>


# OSDCloud Automate


# Basic Configuration

OSD 23.5.23.1+ Updated May 23, 2023

## Create a new OSDCloud Workspace

For this demo, I decided to create a new OSDCloud Workspace for testing.  You can use your existing OSDCloud Workspace, but it's easier if I start clean.  Here's the script that I used

{% code overflow="wrap" lineNumbers="true" fullWidth="true" %}

```powershell
#Set my working OSDCloud Template
Set-OSDCloudTemplate -Name 'WinPE KB5026372'

#Create my new OSDCloud Workspace
New-OSDCloudWorkspace -WorkspacePath D:\Demo\OSDCloud\Automate

#Cleanup Languages
$KeepTheseDirs = @('boot','efi','en-us','sources','fonts','resources')
Get-ChildItem "$(Get-OSDCloudWorkspace)\Media" | Where {$_.PSIsContainer} | Where {$_.Name -notin $KeepTheseDirs} | Remove-Item -Recurse -Force
Get-ChildItem "$(Get-OSDCloudWorkspace)\Media\Boot" | Where {$_.PSIsContainer} | Where {$_.Name -notin $KeepTheseDirs} | Remove-Item -Recurse -Force
Get-ChildItem "$(Get-OSDCloudWorkspace)\Media\EFI\Microsoft\Boot" | Where {$_.PSIsContainer} | Where {$_.Name -notin $KeepTheseDirs} | Remove-Item -Recurse -Force

#Build WinPE to start OSDCloudGUI automatically
Edit-OSDCloudWinPE -UseDefaultWallpaper -StartOSDCloudGUI
```

{% endcode %}

<figure><img src="/files/etaSqYEeAEqyh8HIEezG" alt=""><figcaption></figcaption></figure>

## Automate Paths

OSDCloud Automate looks for content in the following relative path by scanning all drives.  It does not include C:\\

```
<DriveLetter>:\OSDCloud\Automate
```

Understanding that requirement, there are two places that I can use this in my OSDCloud Workspace

```
#Content will be on the ISO or USB Boot Partition
#Ideal for Virtual Machine testing
$(Get-OSDCloudWorkspace)\Media\OSDCloud\Automate

#Content will be on the USB Drive
#Ideal for Physical Machine testing
$(Get-OSDCloudWorkspace)\OSDCloud\Automate
```

<figure><img src="/files/z68vDN6MC2ogPyXqUUDs" alt=""><figcaption></figcaption></figure>

A third option would be to mount my WinPE and add an OSDCloud\Automate directory so it resolves to X:\OSDCloud\Automate.  This would be ideal for WDS, but that solution isn't covered in this guide

Finally, keep in mind that if you plan on having large Provisioning Packages, your WinPE Boot Partition on a USB may not be large enough for the PPKG file.  Got it?


# OSDCloudGUI Defaults

OSD 23.5.24.1+ Updated May 24, 2023

Several of you have been asking me about setting the OSDCloudGUI defaults.  So let's get into it.  First of all you need to be running OSD PowerShell Module 23.5.24.1 or newer, so make sure you have that updated

## Start-OSDCloudGUI.json

In Windows, launch Start-OSDCloudGUI and focus on the first line.  This is the default OSDCloudGUI configuration

<figure><img src="/files/uesCNPZ3epTSDnPYQehL" alt=""><figcaption></figcaption></figure>

Copy this file to your OSDCloud Automate directory in your OSDCloud Workspace

<figure><img src="/files/5aOqiZIvVCprUydvHsPx" alt=""><figcaption></figcaption></figure>

## Edit Start-OSDCloudGUI.json

Start cleaning up this file and remove everything that does not need to be modified, especially the Computer information and the DriverPacks.  You should end up with something similar to what I have below

{% code lineNumbers="true" %}

```json
 {
    "BrandName":  "OSDCloud",
    "BrandColor":  "#0096D6",
    "OSActivation":  "Volume",
    "OSEdition":  "Enterprise",
    "OSLanguage":  "en-us",
    "OSImageIndex":  6,
    "OSName":  "Windows 11 22H2 x64",
    "OSReleaseID":  "22H2",
    "OSVersion":  "Windows 11",
    "OSActivationValues":  [
                               "Retail",
                               "Volume"
                           ],
    "OSEditionValues":  [
                            "Home",
                            "Home N",
                            "Home Single Language",
                            "Education",
                            "Education N",
                            "Enterprise",
                            "Enterprise N",
                            "Pro",
                            "Pro N"
                        ],
    "OSLanguageValues":  [
                             "ar-sa",
                             "bg-bg",
                             "cs-cz",
                             "da-dk",
                             "de-de",
                             "el-gr",
                             "en-gb",
                             "en-us",
                             "es-es",
                             "es-mx",
                             "et-ee",
                             "fi-fi",
                             "fr-ca",
                             "fr-fr",
                             "he-il",
                             "hr-hr",
                             "hu-hu",
                             "it-it",
                             "ja-jp",
                             "ko-kr",
                             "lt-lt",
                             "lv-lv",
                             "nb-no",
                             "nl-nl",
                             "pl-pl",
                             "pt-br",
                             "pt-pt",
                             "ro-ro",
                             "ru-ru",
                             "sk-sk",
                             "sl-si",
                             "sr-latn-rs",
                             "sv-se",
                             "th-th",
                             "tr-tr",
                             "uk-ua",
                             "zh-cn",
                             "zh-tw"
                         ],
    "OSNameValues":  [
                         "Windows 11 22H2 x64",
                         "Windows 11 21H2 x64",
                         "Windows 10 22H2 x64",
                         "Windows 10 21H2 x64",
                         "Windows 10 21H1 x64",
                         "Windows 10 20H2 x64",
                         "Windows 10 2004 x64",
                         "Windows 10 1909 x64",
                         "Windows 10 1903 x64",
                         "Windows 10 1809 x64"
                     ],
    "OSReleaseIDValues":  [
                              "22H2",
                              "21H2",
                              "21H1",
                              "20H2",
                              "2004",
                              "1909",
                              "1903",
                              "1809"
                          ],
    "OSVersionValues":  [
                            "Windows 11",
                            "Windows 10"
                        ],
    "captureScreenshots":  false,
    "ClearDiskConfirm":  true,
    "restartComputer":  true,
    "updateDiskDrivers":  true,
    "updateFirmware":  false,
    "updateNetworkDrivers":  true,
    "updateSCSIDrivers":  true
}
```

{% endcode %}

Collapsing a few items will help you see the design of this file.  There is Branding, Defaults, Values, and Menu Options

<figure><img src="/files/f6BBaNqwm6U0b4EWPeZ1" alt=""><figcaption></figcaption></figure>

## Branding

In my configuration, I'll change the default branding to the following.  If you have no plans on changing the branding, you can remove these entries

```
"BrandName":  "David Cloud",
"BrandColor":  "RED",
```

## Defaults

These can be difficult to configure since you have to get the OSImageIndex correct, but you can use the GUI to get that value.  In my case I changed the defaults from Enterprise Volume to Pro Retail, as well as changing the Language to en-gb

```
"OSActivation":  "Retail",
"OSEdition":  "Pro",
"OSLanguage":  "en-gb",
"OSImageIndex":  9,
"OSName":  "Windows 11 22H2 x64",
"OSReleaseID":  "22H2",
"OSVersion":  "Windows 11",
```

## Values

These are all the possible Values that appear in the combobox.  I'll make some minor adjustments and limit my deployment to 22H2 only, as well as cleaning up the Editions

```
"OSActivationValues":  [
                            "Retail",
                            "Volume"
                        ],
"OSEditionValues":  [
                        "Home",
                        "Education",
                        "Enterprise",
                        "Pro"
                    ],
"OSLanguageValues":  [
                            "en-gb",
                            "en-us"
                        ],
"OSNameValues":  [
                        "Windows 11 22H2 x64",
                        "Windows 10 22H2 x64"
                    ],
"OSReleaseIDValues":  [
                            "22H2"
                        ],
"OSVersionValues":  [
                        "Windows 11",
                        "Windows 10"
                    ],
```

## Menu Options

Finally some changes to the Menu Options, enabling Firmware updates and removing the Clear-Disk confirmation prompt (dangerous)

```
"ClearDiskConfirm":  false,
"restartComputer":  true,
"updateDiskDrivers":  true,
"updateFirmware":  true,
"updateNetworkDrivers":  true,
"updateSCSIDrivers":  true
```

## Complete JSON

Here's what my complete file looks like.  I'll give it a quick save

{% code lineNumbers="true" %}

```
{
    "BrandName":  "David Cloud",
    "BrandColor":  "RED",
    "OSActivation":  "Retail",
    "OSEdition":  "Pro",
    "OSLanguage":  "en-gb",
    "OSImageIndex":  9,
    "OSName":  "Windows 11 22H2 x64",
    "OSReleaseID":  "22H2",
    "OSVersion":  "Windows 11",
    "OSActivationValues":  [
                                "Retail",
                                "Volume"
                            ],
    "OSEditionValues":  [
                            "Home",
                            "Education",
                            "Enterprise",
                            "Pro"
                        ],
    "OSLanguageValues":  [
                                "en-gb",
                                "en-us"
                            ],
    "OSNameValues":  [
                            "Windows 11 22H2 x64",
                            "Windows 10 22H2 x64"
                        ],
    "OSReleaseIDValues":  [
                                "22H2"
                            ],
    "OSVersionValues":  [
                            "Windows 11",
                            "Windows 10"
                        ],
    "ClearDiskConfirm":  false,
    "restartComputer":  true,
    "updateDiskDrivers":  true,
    "updateFirmware":  true,
    "updateNetworkDrivers":  true,
    "updateSCSIDrivers":  true
}
```

{% endcode %}

## Rebuild ISO

Now I can rebuild my OSDCloud ISO so my saved file will be available when OSDCloud starts.  I'm also side-loading the OSD Module as I have unreleased changes that I haven't released to the PowerShell Gallery yet.  Finally I set OSDCloudGUI to start automatically when WinPE starts up

<figure><img src="/files/ylPCLlz2rQnYHxAD3k0E" alt=""><figcaption></figcaption></figure>

## Boot to WinPE and Test

When WinPE started up, OSDCloudGUI automatically launched.  A quick check at my minimized PowerShell window shows that it found the configuration file and imported it.  OSDCloudGUI shows the defaults that I selected and my custom David Cloud Branding

<figure><img src="/files/QIIYjVILSL1mEyGIONrL" alt=""><figcaption></figcaption></figure>

My Operating Systems are limited to Windows 10 and Windows 11 22H2, and the Windows 11 22H2 Business WIM that I had in my ISO:\OSDCloud\OS directory

<figure><img src="/files/xzoC1Pz3BGKsxiHYLm8j" alt=""><figcaption></figcaption></figure>

Windows Edition is set properly and several values were removed

<figure><img src="/files/NqYUuKunnvUSTwA9hnvN" alt=""><figcaption></figcaption></figure>

Languages are incredibly limited to just what I have configured

<figure><img src="/files/0T3dvjc6HSI0QkFr4m3c" alt=""><figcaption></figcaption></figure>

Finally my Deployment Options are set

<figure><img src="/files/rSQXk2Ay75Da3sX2GgWO" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/kZuV8my42DmLQo9RvMKw" alt=""><figcaption></figcaption></figure>


# Autopilot

OSD 23.5.23.1+ Updated May 23, 2023

In this example, I'm going to copy an AutopilotConfigurationFile.json in my OSDCloud Workspace in the Media\OSDCloud\Automate directory.  Additionally, I'll copy a WIM to Media\OSDCloud\OS so that don't have to download an OS for my testing.

<figure><img src="/files/JI3TljtXCXfDzXaZAVC9" alt=""><figcaption></figcaption></figure>

## Boot to WinPE

Now I'll boot to a Virtual Machine to this ISO and start an OSDCloud deployment.  The screenshot below should help you visualize where the Autopilot file is on the ISO

<figure><img src="/files/dfON3ljxd5ljqLl6ylQ3" alt=""><figcaption></figcaption></figure>

You will see the AutopilotConfigurationFile.json is identified before the disk is wiped.  This is for you to validate that your process worked.

<figure><img src="/files/3ncXqvY0fouR7nQM4U5Y" alt=""><figcaption></figcaption></figure>

At the end of the OSDCloud deployment, the OSDCloud Automate will inject the Autopilot Configuration File automatically

<figure><img src="/files/0OT3gEbJRqTSB0EWb106" alt=""><figcaption></figcaption></figure>


# Provisioning

OSD 23.5.23.1+ Updated May 23, 2023

Hopefully you read the how to add your Autopilot configuration.  This will be similar.  Don't worry if you don't know how to create a Provisioning Package, that will be detailed in the next few pages.  This guide will detail how you add a Provisioning Package to your OSDCloud deployment

Here are the paths for you to add your Provisioning Package to either ISO Media or USB

```
#Content will be on the ISO or USB Boot Partition
#Ideal for Virtual Machine testing
$(Get-OSDCloudWorkspace)\Media\OSDCloud\Automate\Provisioning

#Content will be on the USB Drive
#Ideal for Physical Machine testing
$(Get-OSDCloudWorkspace)\OSDCloud\Automate\Provisioning
```

I'll start by adding my Google Chrome Enterprise Provisioning Package and updating my OSDCloud ISO

<figure><img src="/files/6D5IGfKiF5bqgVOmcymK" alt=""><figcaption></figcaption></figure>

## Boot to WinPE

Now I'll boot to a Virtual Machine to this ISO and start an OSDCloud deployment.  The screenshot below should help you visualize where the Provisioning Package is on the ISO.  Invoke-OSDCloud will pick this up automatically before the disk is wiped.  This is for you to validate that your process worked.

<figure><img src="/files/pGdVGAqt4GJG95fGdv1s" alt=""><figcaption></figcaption></figure>

Towards the end of my OSDCloud Deployment, the Provisioning Package will be applied to the offline OS

<figure><img src="/files/saTDYv8pGj1IoropU2AS" alt=""><figcaption></figcaption></figure>

## First Boot

After my computer restarts from WinPE, the Provisioning Package should be applied.  You may or may not see any progress during this Phase

<figure><img src="/files/Froc9cK6do9YDSqfcbW0" alt=""><figcaption></figcaption></figure>

## OOBE

A quick check in OOBE shows that Google Chrome was installed as it is in my Program Files

<figure><img src="/files/TuB1oy1kiSCxRiic0hFQ" alt=""><figcaption></figcaption></figure>

## Windows Desktop

Now when I login for the first time, Google Chrome is already installed and ready to go

<figure><img src="/files/jd1Tsbn3cDpCJBwrTnCG" alt=""><figcaption></figcaption></figure>


# Windows Configuration Designer

OSD 23.5.23.1+ Updated May 23, 2023

Before you can create a Provisioning Package, you will need to install Windows Configuration Designer.  Use the link below to open the Microsoft Store

{% embed url="<https://www.microsoft.com/store/apps/9nblggh4tx22>" %}

<figure><img src="/files/aEM8jAclGIosfKOt0udW" alt=""><figcaption><p>Press the Install button</p></figcaption></figure>

## References

{% embed url="<https://learn.microsoft.com/en-us/windows/configuration/provisioning-packages/provisioning-packages>" %}

{% embed url="<https://go.microsoft.com/fwlink/p/?LinkId=619012>" %}


# MSI Application PPKG

OSD 23.5.23.1+ Updated May 23, 2023

I'll walk you through how to create a Provisioning Package for OS Deployment. In this example, I'll be working with Google Chrome Enterprise.  Start by downloading the MSI from this link

{% embed url="<https://chromeenterprise.google/browser/download/#windows-tab>" %}

On that link, you can select the Google Chrome you want to download.  I'm following these options

1. Stable
2. MSI (not bundle)
3. 64 bit Architecture
4. Make a note of the version, in my case it is 113.0.5672.127
5. Download the file to your Downloads directory

<figure><img src="/files/nrJqLKAs4jsxBZ81nbmh" alt=""><figcaption></figcaption></figure>

## Windows Configuration Designer

You should have Windows Configuration Designer installed.  Open it and select Advanced provisioning

<figure><img src="/files/YJKd81tOCVxkta9v7RPT" alt=""><figcaption></figcaption></figure>

Enter the details of your Project.  The Name field doesn't take periods well, so keep that in mind.  Pres Next

<figure><img src="/files/QtOr3PxAfr8NdLOziy2f" alt=""><figcaption><p>(1) Enter project details (2) Press Next</p></figcaption></figure>

<figure><img src="/files/D9tHw0oQskNvx7MoJ20S" alt=""><figcaption><p>(1) All Windows desktop editions (2) Press Next</p></figcaption></figure>

<figure><img src="/files/c8B4GlhX8rhyGnuVHFbG" alt=""><figcaption><p>Press Finish</p></figcaption></figure>

## Runtime settings

Complete the following steps

1. Expand Runtime settings
2. Expand to ProvisoiningCommands, Primary Context, Command
3. Add a Name for the install.  I chose Install
4. Press the Add button

<figure><img src="/files/tYkhfZusahRMbjcR5Ek5" alt=""><figcaption></figcaption></figure>

Complete the following steps

1. Select the Name that you selected for step 3 in the last screenshot. For me, this is Install
2. CommandFile: Browse to the Google Chrome Enterprise that was downloaded earlier
3. Commands
   1. CommandLine: msiexec /i "googlechromestandaloneenterprise64.msi" /passive /norestart
   2. ContinueInstall:  TRUE.  You don't want this to kill your deployment if the installation fails
   3. RestartRequired:  FALSE.
4. Export Provisioning Package

<figure><img src="/files/OV23OlCbQr2GZPdDC8bb" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/C8eQrVvkrL4xRB2l23ju" alt=""><figcaption><p>(1) Describe the provisioning package (2) Press Next</p></figcaption></figure>

<figure><img src="/files/gqPfGiE8ZNo2dK1coK8a" alt=""><figcaption><p>Press Next</p></figcaption></figure>

<figure><img src="/files/rXv904Oeg2SmN8Si3lGI" alt=""><figcaption><p>Press Next</p></figcaption></figure>

<figure><img src="/files/inEwdMTUiSM64GJB1roJ" alt=""><figcaption><p>Press Build</p></figcaption></figure>

<figure><img src="/files/1K5hQnLr2BotzRCgcipP" alt=""><figcaption><p>Click on the Project folder link</p></figcaption></figure>

<figure><img src="/files/YRH4BRX3g2lVOEq9XLnT" alt=""><figcaption><p>Complete Provisioning Package</p></figcaption></figure>


# Bulk Enroll PPKG

OSD 23.5.23.1+ Updated May 23, 2023

Until I complete this documentation, this silent video below will show you all the steps needed to create a Bulk Enroll Provisioning Package

{% file src="/files/yXFqcNq3cvf1KWFqnrRb" %}

## References

{% embed url="<https://learn.microsoft.com/en-us/mem/intune/enrollment/windows-bulk-enroll>" %}

{% embed url="<https://learn.microsoft.com/en-us/windows/client-management/bulk-enrollment-using-windows-provisioning-tool>" %}

{% embed url="<https://oofhours.com/2022/03/04/automatically-join-devices-to-azure-ad/>" %}

{% embed url="<https://oofhours.com/2023/02/14/simplify-the-process-of-generating-an-aad-bulk-enrollment-provisioning-package/>" %}

{% embed url="<https://www.deploymentresearch.com/windows-autopilot-plan-b/>" %}

{% embed url="<https://www.petervanderwoude.nl/post/bulk-enrollment-for-windows-10-devices/>" %}

{% embed url="<https://aadinternals.com/post/bprt/>" %}


# PowerShell Script PPKG

OSD 23.5.23.1+ Updated May 23, 2023

In this example, I'm going to detail how to wrap a PowerShell script in a Provisioning Package.  The best example I can use is the Provisioning Package that I created to expand Driver Packs in First Boot.

## PowerShell Script

First you need to make sure you have a standalone PowerShell Script that does not require interaction as Provisioning Packages won't allow that.  Here's my script that is saved in a PS1 file

<figure><img src="/files/TPszu8pKSxIGxASJ8m4L" alt=""><figcaption></figcaption></figure>

## Windows Configuration Designer

Open Windows Configuration Designer and select Advanced Provisioning

<figure><img src="/files/LwHqF1BVwwqVZBV2cRBh" alt=""><figcaption><p>Advanced provisioning</p></figcaption></figure>

Complete the details for your project and press Next

<figure><img src="/files/iDcXb6lAngh4COjKCOKK" alt=""><figcaption><p>(1) Enter project details (2) Press Next</p></figcaption></figure>

Select All Windows desktop editions and press Next

<figure><img src="/files/iuR5q9rumrnLtBuFBiRl" alt=""><figcaption><p>(1) All Windows desktop editions (2) Press Next</p></figcaption></figure>

<figure><img src="/files/GT5PKUGKiTZB19huU1Gu" alt=""><figcaption><p>Press Finish</p></figcaption></figure>

## Runtime settings

Complete the following steps:

1. Expand Runtime settings
2. Expand ProvisoiningCommands, DeviceContext, CommandFiles
3. Press Browse
4. Find and select your PowerShell script
5. Press the Open button

<figure><img src="/files/LXI5DiEIvyG1GaJCWQpY" alt=""><figcaption></figcaption></figure>

Press the Add button

<figure><img src="/files/1ErVcYyqgnT6YRLfQZUX" alt=""><figcaption><p>Press the Add button</p></figcaption></figure>

Complete the following steps:

1. Select CommandLine
2. Enter the following command line (change the name of the PowerShell script to your file name)

```
PowerShell.exe -ExecutionPolicy Unrestricted .\Invoke-OSDCloudDriverPack.ps1
```

<figure><img src="/files/poJFxfyLFxZm2VVZ2GCv" alt=""><figcaption></figcaption></figure>

Press Export and Provisioning package

<figure><img src="/files/JcItep4jwqfafgo1yxMs" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/P1YoLuKBOs26XxaaDL2V" alt=""><figcaption><p>(1) Describe the provisioning package (2) Press the Next button</p></figcaption></figure>

<figure><img src="/files/XMKrCY8b9bzh9ariltWj" alt=""><figcaption><p>Press the Next button</p></figcaption></figure>

<figure><img src="/files/7h9l9F17rjGZ7zf4TWn7" alt=""><figcaption><p>Press the Next button</p></figcaption></figure>

<figure><img src="/files/vnZ0XZaMrZeMktXyoN4i" alt=""><figcaption><p>Press the Build button</p></figcaption></figure>

<figure><img src="/files/Tix4JLP6l6mokqmbqzVD" alt=""><figcaption><p>(1) Click on the Project folder link (2) Press the Finish button</p></figcaption></figure>

<figure><img src="/files/iMG7YSxc4OHsGCvlKsrW" alt=""><figcaption><p>Complete Provisioning Package</p></figcaption></figure>


# OSDCloud Azure


# Azure Setup

## Considerations

Before taking a Deep Dive at imaging from Azure, it's only fair to discuss some considerations

#### #1: This is New

It's so new that there isn't anything I can copy from, so I'm going to share as much information as possible so the Community can make some decisions going forward.  I'm just making this up as I go

#### #2: I'm no Expert

See #1

#### #3: Change is Likely

At this point, nothing is set in stone, so things will likely change, and you will need to adapt and get over it.  If you prefer things being more stable, come back in a few months

#### #4: Feedback

I'm not a mind reader.  Hit me up on Twitter and let's get a Community Pulse

#### #5: Goal

To deploy a Windows Image from Azure (Storage).  For now, this is a WIM file.  Nothing else at this time

#### #6: Differences

What works for me may not work for you

#### #7: Custom Development

Unless I'm on your Payroll, not likely.  See #4

#### #8: Training

I'll gladly help you with OSDCloud, but if you have specific Azure questions, consult Microsoft Docs.  I'll link where applicable

#### #9: Costs

Azure is not free, and Storage has costs, but it's cheap.  It should cost about $.50 per deployment.  Do the math to determine if this is a good fit for you

{% embed url="<https://azure.microsoft.com/en-us/pricing/calculator>" %}


# Azure Portal

This section is going to detail how to run OSD from Azure Storage.  If you know nothing about Azure Storage, then you may find this helpful

{% content-ref url="/pages/WGVfnthP0rSyBTDVD51v" %}
[Storage Accounts](/osdcloud-v1/osdcloud-azure/azure-setup/azure-portal/storage-accounts)
{% endcontent-ref %}

The first thing you will need to create is a Storage Account.  Think of this as your Deployment Server.  Your Azure environment may consist of one or hundreds of Storage Accounts which are used for all kinds of things, such as Azure Functions, or Web Services.  For OSDCloud to find the correct Storage Account to use, the Storage Account contains a Tag, which is a Key Value pair.  OSDCloud ignores all Storage Accounts that do not have a Tag Key of OSDCloud (the Value doesn't matter yet, just the Key).  For the Tag to be read, the Deployment User needs to have Reader role on the Storage Account.  This design makes it able to find the proper Storage Accounts to use for OSDCloud in generally less than a second.

{% content-ref url="/pages/XZXZh8kVYp4GJrJQhR8w" %}
[Storage Containers (Public)](/osdcloud-v1/recycle-bin/storage-containers-public)
{% endcontent-ref %}

{% content-ref url="/pages/9s3DjjWqEfDIxNki00UO" %}
[Storage Containers](/osdcloud-v1/osdcloud-azure/azure-setup/azure-portal/storage-containers)
{% endcontent-ref %}

Storage Containers exist within a Storage Account.  Think as these as Deployment Shares, which can either be Public or Private.  It may be quite helpful to put a WinPE Boot ISO that contains no sensitive information in your Public Storage Container, or don't may one at all.  Public Storage Containers are optional, OSDCloud doesn't need them

What OSDCloud does need are Storage Containers with WIM files (ISO support is coming soon).  These should be kept in a Private (Secure) Storage Container.

Files that exist in the Storage Containers are called Blobs.  In the scope of OSDCloud, these Blobs would be WIM files.  The only role that is needed to access the Blob is Storage Blob Data Reader

When you are ready to set the required access to your Storage Account and Storage Containers, review the following page

{% content-ref url="/pages/XVioZRw2WDNpcfIvWHqi" %}
[Storage Access Control (IAM)](/osdcloud-v1/osdcloud-azure/azure-setup/azure-portal/storage-access-control-iam)
{% endcontent-ref %}

Once you have these steps complete, simply upload your WIM files into your Storage Containers and they will be ready for OSDCloud to use.  For now, only Image Index 1 is used, but more functionalities will be added soon, including a GUI

Feedback is critical at this point as this is being designed from scratch.  If you have some ideas for improvement, please reach out

## Sponsor

{% embed url="<https://www.recastsoftware.com/?utm_source=osdeploy&utm_medium=ad&utm_campaign=web>" %}
OSDeploy is sponsored by Recast Software
{% endembed %}


# Storage Accounts

{% embed url="<https://docs.microsoft.com/en-us/azure/storage/common/storage-account-overview>" %}

## Basics

To deploy from Azure, you will first need a Storage Account.  Make sure you pick a good Region as this will impact costs.  Don't go crazy here, you are serving up a 4GB WIM, so Standard Performance and Local Redundancy should work fine

![](/files/sKroknl9nbGBWEEEHVje)

## Advanced

You will need to decide if you want Public Access or not. This does not enable it by default, it only gives the option to enable it later.  I recommend this as a method of keeping a WinPE ISO that can be easily accessed if needed, but you will need to decide what is best for your environment

Yes, default to Azure Active Directory authorization

Do the math on the calculator.  You will be accessing date more frequently than writing data, and I have found that the Hot comes out cheaper than Cool for the Access Tier

![](/files/88waEzJYAyvZb7syv1WB)

## Networking

This will vary, but I generally leave the defaults

## Data Protection

You should not need Recovery ... but that's your call

It's a good idea to enable Tracking if multiple people have write access to the Storage Account.  Versioning is not necessary, just upload an image with a different name as that should contain version information as a best practice anyway

![](/files/byeqIMiChvnjMtamcfiE)

## Encryption

I leave this as Default

## Tags

OSDCloud requires a Storage Account Tag for proper integration.  The Name should be OSDCloud and the Value can be anything you want.  Make sure to select the Tag only for the Storage Account

![](/files/QFKEoZwjwR38Gx7P4cbj)

During the WIM selection of the Azure OSDCloud Deployment, the Tag is displayed with the Storage Account

![](/files/CGllumUlU1VbxUB4vnAk)

## Review + Create

Do it.

![](/files/xnDQ1ecKPikHyid0IKUI)

## Sponsor

{% embed url="<https://www.recastsoftware.com/?utm_source=osdeploy&utm_medium=ad&utm_campaign=web>" %}
OSDeploy is sponsored by Recast Software
{% endembed %}


# Storage Containers

{% embed url="<https://docs.microsoft.com/en-us/azure/storage/common/storage-introduction>" %}

Storage Containers exist within the Azure Storage Account.  These can be set to be Public, but for the scope of OSDCloud Azure, these should be kept Private and Secure.

## Container Naming

Containers can be named whatever you want them to be to help you organize your Windows Images.  In the example below, I've created Storage Containers to separate the different Windows Image types

![](/files/CuHnpIAdoUWQaQLH8UdW)

Containers can also be named to separate your Teams, there isn't a wrong way to design this

* [ ] Client Image Development Team
* [ ] Client Image Deployment Team
* [ ] Server Image Development Team
* [ ] Server Image Deployment Team

One thing to remember is that each Container can have different Roles for Access

## Create an Images Storage Container

In this example, I will create a simple Storage Container called Images that will contain my Windows Images

![](/files/EZ3Knn3PAZSJT5p9vBvW)

## Upload WIM

Now you can upload a WIM to your images Container. Select Upload and then browse to your WIM.  You will need to select Overwrite since we have not added any Access Control yet, and use the Account key option for the upload

![](/files/5IfFFmWFjTl4t6ZK5c13)

## Sponsor

{% embed url="<https://www.recastsoftware.com/?utm_source=osdeploy&utm_medium=ad&utm_campaign=web>" %}
OSDeploy is sponsored by Recast Software
{% endembed %}


# BootImage

**BootImage** is an optional Storage Container in your **OSDCloud Storage Account (tagged)** that is used for delivering OSDCloud ISO's or any other ISO Boot Image.  Accounts must have the **Storage Blob Data Reader** role for this Storage Container to download the Boot Images.  Simply upload your latest OSDCloud ISO or other Boot Image to this Container

![](/files/oZvL80wpHzzOQQQDVsQQ)

## Sponsor

{% embed url="<https://www.recastsoftware.com/?utm_source=osdeploy&utm_medium=ad&utm_campaign=web>" %}
OSDeploy is sponsored by Recast Software
{% endembed %}


# DriverPack

**DriverPack** is an optional Storage Container in your **OSDCloud Storage Account (tagged)** that is used for mirroring vendor Driver Packs. Accounts must have the **Storage Blob Data Reader** role for this Storage Container to download the Driver Packs

It is recommended that you separate Device Manufacturers to help filter the content. This is not a requirement, but this may be added at a later date without warning.  You create these paths during the upload of a Driver Pack

![](/files/ja8Md7T5wjOeZiPP0k6L)

The contents of the dell folder contain Dell Driver Packs that are simply copied without any conversion. This purpose of mirroring the Dell Driver Packs is because downloading content from Dell's site may run slow on occasion, and this allows my deployments to run faster

![](/files/WROEb6ypYHdHfVBF722l)

For Lenovo, I opt to convert the EXE to a ZIP or CAB file and Upload the new file in the Azure Container. This is recommended to allow the Lenovo (HP and Surface) drivers to install in WinPE instead of the Specialize Phase

![](/files/Ztx5WxQitMPiHuoOPP7L)

## Obtaining Driver Packs

You can easily download the DriverPacks that OSDCloud uses to a USB Drive using the following&#x20;

```powershell
Update-OSDCloudUSB -DriverPack *
```

You can use this function to download the Driver Packs you need from any of the Device Manufacturers that are supported by OSDCloud

![](/files/sHvUJLPQIXweJt4wm2dR)

You can then Upload them to the DriverPack Storage Container, or convert the EXE files to CAB or ZIP before uploading

{% hint style="warning" %}
Remember to keep the same BaseName as the original DriverPack as this is what is matched in Azure Storage.  The Extension can be ZIP, CAB, MSI, or EXE
{% endhint %}

## Deployment

During OSDCloud Azure deployment, if a Driver Pack BaseName is matched in the DriverPack Storage Container, it will be downloaded from Azure instead of the Device Manufacturer's site

![](/files/4Atprak1whzXi9k8CALp)

## Sponsor

{% embed url="<https://www.recastsoftware.com/?utm_source=osdeploy&utm_medium=ad&utm_campaign=web>" %}
OSDeploy is sponsored by Recast Software
{% endembed %}


# Storage Access Control (IAM)

## Reader

{% embed url="<https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#reader>" %}

For OSDCloud to work with Azure Storage, the Technician will need Reader access to the Storage Account.  This allows for the reading of Tags which are used by OSDCloud, and the listing of the Containers

![](/files/5OHohLCrshCMVwyLL8Tf)

## Storage Blob Data Reader

{% embed url="<https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#storage-blob-data-reader>" %}

Additionally, the Storage Blob Data Reader must be added for the Containers in the Storage Account that contains the WIM files.  This can be added at the Storage Account level, or a specific Container

![](/files/Mkdsgg4lwNgsLYEhGm26)

## Azure Role Assignments

Verify the proper permissions in Azure Active Directory

![](/files/Rxyavngh3kYykmsUv1Ik)

## Sponsor

{% embed url="<https://www.recastsoftware.com/?utm_source=osdeploy&utm_medium=ad&utm_campaign=web>" %}
OSDeploy is sponsored by Recast Software
{% endembed %}


# Infrastructure As Code

## Infrastructure As Code

In this section we will use infrastructure as code tools to help you configure Azure Storage Accounts and containers with tools like **Bicep** and **Terraform**. We therefore need a number of prerequisites to install the two providers Bicep and Terraform with their respective dependencies.

{% embed url="<https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/overview?tabs=bicep>" %}

{% embed url="<https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs>" %}

## Sponsor

{% embed url="<https://www.recastsoftware.com/>" %}
OSDeploy is sponsored by Recast Software
{% endembed %}


# Prerequisites

### Admin Rights

You are going to be mounting wim files, so yes, this is an absolute with no way around it

For that a function is available, it will allow us to install the following tools :&#x20;

* Terraform for windows
* Bicep for windows
* Azure CLI
* Az.Accounts
* Az.Resources

```
PS > Install-azOSDIacTools
```

![](/files/WFPJpBJYauXJonIb3ew0)

If you launch again the same function we need to find all the version for all tools

![](/files/NtYFtXbDeTad8a6vH5ye)

## Sponsor

{% embed url="<https://www.recastsoftware.com/>" %}
OSDeploy is sponsored by Recast Software
{% endembed %}


# Technicien

With OSDCloud we need a technician account to access the storage account in azure as well as the containers. For this we need to reset his ID. This ID will be used in the declarative files of **Bicep** and **Terraform**.

```
PS > get-azOSDTechId -AzureAdUserName OSD -UseDeviceAuthentication
```

![](/files/gmt73GISuIqirpbxk1iu)

## Sponsor

{% embed url="<https://www.recastsoftware.com/>" %}
OSDeploy is sponsored by Recast Software
{% endembed %}


# Workspace

By default a folder with several subfolders and files will be created at the root of the disk c:\ with the name **osdcloud.**

![](/files/IKd1sCCZjf9yLUGVHZJ2)

{% hint style="warning" %}
**In Windows Terminal you need to use Cascadia Font**&#x20;
{% endhint %}

It is also possible to open the file directly with **Visual Code**, this means that it is already installed on PC.

![](/files/gJJw64ZRGREfwBLlWEkG)

![](/files/7JafRYXqAttkaVdAMyy0)

## Sponsor

{% embed url="<https://www.recastsoftware.com/>" %}
OSDeploy is sponsored by Recast Software
{% endembed %}


# Bicep

With Bicep we need only one file which is located in the directory <mark style="color:purple;">**c:\osdcloud\bicep**</mark>.

![](/files/ffoJExfaSl0Jia9Rflie)

Here is the content of the bicep file, we are only interested in line **62-63** we must come here and insert the [Technicien](/osdcloud-v1/osdcloud-azure/azure-setup/infrastructure-as-code/technicien) I&#x64;**.**

```bicep
@description('Specifies the name of the Azure Storage account.')
param storageAccountName string ='azosdcloud'

@description('Specifies the name of the Azure Storage account.')
param StorageAccuntList string ='azosdscripts'

@description('Specifies the name of the blob for logs container.')
param containerName string = 'logs'

@description('Specifies the location in which the Azure Storage resources should be deployed.')
param location string = resourceGroup().location

@description('Specifies container object list for wim images.')
param containers object = {
  c1:{
    name: 'server'
    type: 'Container'
  }
  c2:{
    name: 'retail'
    type: 'Container'
  }
  c3:{
    name: 'insiders'
    type: 'Container'
  }
  c4:{
    name: 'driverpack'
    type: 'Container'
  }
  c5:{
    name: 'bootimage'
    type: 'Container'
  }

}
@description('Specifies container object list for powershell scripts, packages, unattend.')
param scripts object = {
  c1:{
    name: 'scripts'
    type: 'Container'
  }
  c2:{
    name: 'packages'
    type: 'Container'
  }
  c3:{
    name: 'unattend'
    type: 'Container'
  }
  c4:{
    name: 'others'
    type: 'Container'
  }
}

@description('This is the built-in Storage Blob Data Reader.')
resource StorageBlobDataReaderDefinition 'Microsoft.Authorization/roleDefinitions@2018-01-01-preview' existing = {
  scope: subscription()
  name: 'b7e6dc6d-f1e8-4753-8033-0f276bb0955b'
}
@description('This is the ID for the AzureADAccount who can access.')
param principalId string = ''

resource AzStorage 'Microsoft.Storage/storageAccounts@2021-06-01' = {
  name: storageAccountName
  location: location
  tags : {
    OSDCloud :'production' 
  }
  sku: {
    name: 'Standard_LRS'
  }
  kind: 'StorageV2'
  properties: {
    accessTier: 'Hot'
    allowBlobPublicAccess: true
    allowSharedKeyAccess:true
    minimumTlsVersion: 'TLS1_2'
    defaultToOAuthAuthentication: true
    
  }
}
resource AzScripts 'Microsoft.Storage/storageAccounts@2021-06-01' = {
  name: StorageAccuntList
  location: location
  tags : {
    OSDScripts :'powershell' 
  }
  sku: {
    name: 'Standard_LRS'
  }
  kind: 'StorageV2'
  properties: {
    accessTier: 'Hot'
    allowBlobPublicAccess: true
    allowSharedKeyAccess:true
    allowCrossTenantReplication: true
    minimumTlsVersion: 'TLS1_2'
    defaultToOAuthAuthentication: true
  }
}

resource log 'Microsoft.Storage/storageAccounts/blobServices/containers@2021-06-01' = {
  name: '${AzStorage.name}/default/${containerName}'

}

resource containerlist 'Microsoft.Storage/storageAccounts/blobServices/containers@2021-06-01' =[for cont in items(containers):{
  name:'${AzStorage.name}/default/${cont.value.name}'
  properties: {
    publicAccess: cont.value.type
}
}]

resource containerscriptlist 'Microsoft.Storage/storageAccounts/blobServices/containers@2021-06-01' =[for cont in items(scripts):{
  name:'${AzScripts.name}/default/${cont.value.name}'
  properties: {
    publicAccess: cont.value.type
}
}]

resource ActivateFeedStorage 'Microsoft.Storage/storageAccounts/blobServices@2021-09-01' = {
  name: 'default'
  parent: AzStorage
  properties: {
    changeFeed: {
      enabled: true
    }
  }
}
resource ActivateFeedScript 'Microsoft.Storage/storageAccounts/blobServices@2021-09-01' = {
  name: 'default'
  parent: AzScripts
  properties: {
    changeFeed: {
      enabled: true
    }
  }
}

resource roleAssignmentAzStorage 'Microsoft.Authorization/roleAssignments@2020-10-01-preview' = {
  scope: AzStorage
  name: guid(AzStorage.id, principalId, StorageBlobDataReaderDefinition.id)
  properties: {
    roleDefinitionId: StorageBlobDataReaderDefinition.id
    principalId: principalId
    principalType: 'User'
  }
}
resource roleAssignmentAzSScripts 'Microsoft.Authorization/roleAssignments@2020-10-01-preview' = {
  scope: AzScripts
  name: guid(AzScripts.id, principalId, StorageBlobDataReaderDefinition.id)
  properties: {
    roleDefinitionId: StorageBlobDataReaderDefinition.id
    principalId: principalId
    principalType: 'User'
  }
}

```

Once this Bicep file is executed your **Azure** environment will be configured with two **storage accounts**, one for wim image storage and a second one still expiring for powershell scripts, packages, unattend and others.

## Sponsor

{% embed url="<https://www.recastsoftware.com/>" %}
OSDeploy is sponsored by Recast Software
{% endembed %}


# Terraform

Unlike Bicep Terraform allows us to separate the variables of the definition files from the state of our infrastructure, the working folder is c:\osdcloud\terraform

![](/files/6pwO5dNysda9MHez1XbZ)

### File main.tf

This is the main file of terraform and contains the complete description of the future infrastructure.

```bicep
resource "azurerm_resource_group" "RessourceGroup" {
    location    = var.osdcloud_Location
    name      = var.osdcloud_resourcegroup
}

resource "azurerm_storage_account" "OSDCloud" {
  account_replication_type = "LRS"
  account_tier             = "Standard"
  location                 = var.osdcloud_Location
  name                     = var.osdcloud_StorageAccountOSDCloud
  resource_group_name      = var.osdcloud_resourcegroup
  access_tier              = "Hot"
  min_tls_version          = "TLS1_2"
  account_kind             = "StorageV2"
  shared_access_key_enabled = true
  allow_nested_items_to_be_public = true
    blob_properties {
      change_feed_enabled = true
    }
  
  tags = {
    OSDCloud = "production"
  }
  depends_on = [
    azurerm_resource_group.RessourceGroup,
  ]
}
resource "azurerm_storage_account" "OSDScripts" {
    depends_on = [
    azurerm_resource_group.RessourceGroup,
  ]

  account_replication_type = "LRS"
  account_tier             = "Standard"
  location                 = var.osdcloud_Location
  name                     = var.osdcloud_StorageAccountOSDScripts
  resource_group_name      = var.osdcloud_resourcegroup
  min_tls_version          = "TLS1_2"
  access_tier              = "Hot"
  account_kind             = "StorageV2"
  shared_access_key_enabled = true
  allow_nested_items_to_be_public = true
    blob_properties {
      change_feed_enabled = true
    }
  tags = {
    OSDScripts = "powershell"
  }
}

resource "azurerm_storage_container" "ContainerOSDCloud" {
   depends_on = [
    azurerm_resource_group.RessourceGroup,
    azurerm_storage_account.OSDCloud,
  ]

  count = length(var.osdcloud_containers)
  name                  = var.osdcloud_containers[count.index]
  storage_account_name  = azurerm_storage_account.OSDCloud.name
  container_access_type = "container"
}

resource "azurerm_storage_container" "ContainerOSDScripts" {
  count = length(var.osdscript_containers)
  name                  = var.osdscript_containers[count.index]
  storage_account_name  = azurerm_storage_account.OSDScripts.name
  container_access_type = "container"
}

resource "azurerm_role_assignment" "RBAC_OSDCloud" {
  scope                = azurerm_storage_account.OSDCloud.id
  role_definition_name = "Storage Blob Data Reader"
  principal_id         = var.technicien_id
}
resource "azurerm_role_assignment" "RBAC_OSDScripts" {
  scope                = azurerm_storage_account.OSDScripts.id
  role_definition_name = "Storage Blob Data Reader"
  principal_id         = var.technicien_id
}

```

### File provider.tf

The providers file contains the information to connect to Azure.

```bicep
terraform {
  backend "local" {}
  required_providers {
    azurerm = {
      source = "hashicorp/azurerm"
      version = "3.9.0"
    }
  }
}

provider "azurerm" {
  subscription_id = var.subscription_id
  tenant_id =  var.tenant_id
  features {}
}

```

### File variables.tf

This file allows you to understand the role of each variable as well as the type that accepts variables, objects, lists, integer etc...

```bicep
variable "osdcloud_containers" {
    description = "List of containers to create for OSDCloud"
    type = list
}
variable "osdscript_containers" {
    description = "List of containers to create for OSDScripts"
    type = list
}
variable "osdcloud_resourcegroup" {
    description = " Name for the resource group"
    type = string
}
variable "osdcloud_StorageAccountOSDCloud" {
    description = "The name of the storage account for OSDCloud"
    type = string
}
 variable "osdcloud_StorageAccountOSDScripts" {
    description = "The name of the storage account for OSDScripts"
    type = string   
 }   
variable "osdcloud_Location" {
    description = "Select your Azure region"
    type = string

 validation {
    condition = contains(
      ["eastasia", "southeastasia", "centralus","eastus","eastus2","westus","northcentralus","southcentralus","northeurope","westeurope","japanwest","japaneast","brazilsouth","australiaeast","australiasoutheast","southindia","centralindia","westindia","canadacentral","canadaeast","uksouth","ukwest","westcentralus","germanywestcentral","norwaywest","norwayeast","brazilsoutheast","westus3","swedencentral"],
      var.osdcloud_Location
    )
    error_message = "Err: This location is not valid for Azure."
  }
}
variable "subscription_id" {
    description = " your Azure subscription id"
    type = string
}

variable "technicien_id" {
    description = " your AzureAD User Id, it can only connect to storage account download and list objects"
    type = string
}
variable "tenant_id" {
    description = " your Azure tenant id"
    type = string
}
```

### file terraform.tfvars

It is in this file that we must fill in all the necessary information.

* [x] The Azure regrion
* [x] The subscription Id
* [x] The [Technicien](/osdcloud-v1/osdcloud-azure/azure-setup/infrastructure-as-code/technicien) Id
* [x] The tenant Id

```
osdcloud_containers = ["server", "retail", "insiders", "driverpack", "bootimage"]
osdscript_containers = ["scripts", "packages", "unattend", "others"]
osdcloud_resourcegroup = "AzOSDCloud"
osdcloud_StorageAccountOSDScripts = "osdscripts"
osdcloud_StorageAccountOSDCloud = "osdcloud"
osdcloud_Location = ""
subscription_id = ""
technicien_id = ""
tenant_id = ""
```

## Sponsor

{% embed url="<https://www.recastsoftware.com/>" %}
OSDeploy is sponsored by Recast Software
{% endembed %}


# Configure Azure

## Admin Right

You are going to be mounting wim files, so yes, this is an absolute with no way around it

## Function

For this we have a single function **invoke-AzOSDAzureConfig** that admits several *parameters*. It has two **parameterSetName** one for Bicep and one for Terraform

* <mark style="color:blue;">**ParameterSetName Bicep**</mark>
* Location : corresponding Azure region
* ResourceGroupName : corresponding the resource group create in Azure

```
invoke-AzOSDAzureConfig -Location westeurope -ResourceGroupName osdclouddemo
```

* <mark style="color:blue;">**ParameterSetName Terraform**</mark>
* UseTerraform : Is boolean parameter

```
PS C:\Users\JM2K69> invoke-AzOSDAzureConfig -UseTerraform $true
```

The function uses the command *Connect-AzAccount -UseDeviceAuthentication* for the authentication part with <mark style="color:purple;">**Bicep**</mark> and for the <mark style="color:purple;">**Terraform**</mark> part we will use ***Azure Cli*** with *az login --use-device-code*

## Terraform execution

### Terraform.tfvars&#x20;

```
osdcloud_containers = ["server", "retail", "insiders", "driverpack", "bootimage"]
osdscript_containers = ["scripts", "packages", "unattend", "others"]
osdcloud_resourcegroup = "AzOSDClouddemo"
osdcloud_StorageAccountOSDScripts = "osdscriptsdemo"
osdcloud_StorageAccountOSDCloud = "osdclouddemo2"
osdcloud_Location = "westeurope"
subscription_id = "9b288c1f-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
technicien_id = "1618bbc9-bdce-45af-a3bd-a86c224d8094"
tenant_id = "d1c6xxxx-d6xx-4xx-xxxx-313xxxxxxx86be"

```

### Execution

![](/files/zcrGPZTgIc9xbuj0AH31)

![](/files/Os29lrqaw0vetpzlwwfF)

### Verify in Azure

#### Resource groups

![Resource Group in Azure portal](/files/1OlPsiG0M4nqsj910eC6)

#### Storage account properties

![Tag, all properties are set.](/files/OgpnnvgSI7UME4Kysg6d)

#### Acces Control (IAM)

![](/files/YLE3cvk1QgBruTtbZ7LH)


# Deployment

If your OSDCloud Azure Setup is complete, and you're run a quick test, here is how to make things work in WinPE.  You will need the **OSD PowerShell Module 22.6.1+**

## OSDCloud Boot Image

If you are using an OSDCloud boot image, then the OSD PowerShell Module should be updated automatically. In a PowerShell prompt, run **`Start-OSDCloudAzure`**.  You will be prompted for Azure Device Authentication

![](/files/nSsSZU9oJum6EYwyICnq)

### Device Authentication Flow

Follow the instructions and authenticate to Azure on a separate device running a full OS (not WinPE) or a Mobile Web Browser

![](/files/XkPelcEV8TcGucdI5cXl)

### Multiple Azure Subscriptions

You may have multiple Azure Subscriptions, you will be required to select one using the crude menu pictured below

![](/files/F7gmBnOlTm8pNL9W6CGp)

### OSDCloud Azure

Once you are connected to Azure, you'll be presented with OSDCloud Azure where you can select an appropriate Operating System

![](/files/Ml9QlgkOTf7VMk6QwLVC)

### Deployment Options

This will change from time to time as more features are added. They should look identical to OSDCloud "Classic"

![](/files/OyZ12f8HAikskcbwjkgB)

### Microsoft Update Catalog

In addition to Network Drivers, Disk and SCSIAdapter Drivers are also downloaded from Microsoft Update Catalog. This is to ensure that you are able to boot to Specialize for EXE Driver Extraction. You have the option to download System Firmware on supported devices as well

![](/files/b4YNnTM1G3FLECSTfrdl)

### Driver Pack

You are able to select a different Driver Pack, Microsoft Update Catalog, or None as needed&#x20;

![](/files/KfJnemF2IET1ZrSF4BDr)

### Start

Once you have sorted out your options, press Start

![](/files/V4xhVNlxaZEhuPveLqVU)

### OSDCloud Variables

Invoke-OSDCloud is the Task Sequence and it is Variable driven. You will see the Variables that you have set prior to starting Invoke-OSDCloud

![](/files/ckKBld3bs6tUrYuYGJ6N)

### Invoke-OSDCloud

The Windows Image or ISO that you selected will be download during this process

![](/files/ld955XaaRwi1OtFur8yP)

### ISO Deployment

If you selected an ISO instead of a WIM, and the Index was set to Auto, you will be prompted to select a Windows Image

![](/files/7Bfbl6vmmnTIKFSvpJPE)

### Complete

If everything worked out properly, within a few minutes you will have a completed OS ready to reboot

![](/files/LhiPRHH9TpH0AX10pnNz)

## Sponsor

{% embed url="<https://www.recastsoftware.com/?utm_source=osdeploy&utm_medium=ad&utm_campaign=web>" %}
OSDeploy is sponsored by Recast Software
{% endembed %}




---

[Next Page](/llms-full.txt/1)

