> For the complete documentation index, see [llms.txt](https://www.osdeploy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.osdeploy.com/guides/pscloudscript/pscloudscript-examples/osdcloud-winpe-and-oobe.md).

# OSDCloud WinPE and OOBE

In this example, I configured a PSCloudScript that had separate routines for WinPE and OOBE. Both routines used the same command line

```
powershell iex(irm 10.demo.osdcloud.com)
```

{% hint style="warning" %}
The above URL is broken at this time until my testing is complete
{% endhint %}

## WinPE

This routine had OSDCloud preconfigured with everything except the OSLanguage. I work for a global company, so a single language won't work

```powershell
Start-OSDCloud -OSBuild 20H2 -OSEdition Enterprise -OSLicense Volume -Firmware -SkipAutopilot -SkipODT -Restart
```

This allows the technician to specify the Language during deployment. This deployment was configured to Restart to OOBE automatically

![](/files/V6LQedpcABJU0n6LxCGY)

![](/files/PXOKMh7EW73EBRYRJOKC)

![](/files/pL6027Ui00RLs8jD3s40)

![](/files/o2E1lcb4A2n8FcTmO41P)

## OOBE

Press Shift + F10 to open a command prompt from this screen

![](/files/R3uJ6uoo7vEtBKgN8ZAG)

This OOBE is configured to open Display Settings so I could resize the screen as needed on my Virtual Machine. Closing Display Settings will continue to the next step

![](/files/tUAzdlFUNznKqakUL9Wd)

Language is important as it gives me the ability to add an additional language or keyboard if necessary

![](/files/O7upNIYGnU4OdiVvVSq2)

Finally Date and Time Settings so I can change from Pacific Time Zone to something a little closer to home

![](/files/R420JNUhhroiDHkjzkAZ)

Autopilot was configured with my GroupTag in the script, so all I needed to do was enter my credentials to join my Tenant. You will notice the main window was configured to remove specific Appx Packages and to add Windows Capabilities that I needed like RSAT and NetFX3

![](/files/zKLUmEsdF3ZvTLEeHy1a)

Windows Update was also enabled for Drivers and the Operating System

![](/files/N5KRqr8HBd3hiyfeL1i5)

Finally, the process ends with an automatic reboot that will wait for the Autopilot to complete first

![](/files/8AnbeTFleTNuU8x2NUf4)

All the above OOBE steps were completed with this simple configuration

```powershell
#=================================================
#   oobeCloud Settings
#=================================================
$Global:oobeCloud = @{
    oobeSetDisplay = $true
    oobeSetRegionLanguage = $true
    oobeSetDateTime = $true
    oobeRegisterAutopilot = $true
    oobeRegisterAutopilotCommand = 'Get-WindowsAutopilotInfo -Online -GroupTag Demo -Assign'
    oobeRemoveAppxPackage = $true
    oobeRemoveAppxPackageName = 'CommunicationsApps','OfficeHub','People','Skype','Solitaire','Xbox','ZuneMusic','ZuneVideo'
    oobeAddCapability = $true
    oobeAddCapabilityName = 'ActiveDirectory','BitLocker','GroupPolicy','RemoteDesktop','ServerManager','VolumeActivation','NetFX'
    oobeUpdateDrivers = $true
    oobeUpdateWindows = $true
    oobeRestartComputer = $true
    oobeStopComputer = $false
}
```

## Summary

This is an incredibly easy way to deploy an Autopilot device without any infrastructure with a single command line used in WinPE and OOBE. I'm still working on some cleanup, but expect to hear more soon

```
powershell iex(irm 10.demo.osdcloud.com)
```

## Sponsor

OSDeploy is sponsored by [Recast Software](https://www.recastsoftware.com/?utm_source=osdeploy\&utm_medium=ad\&utm_campaign=web) and their Systems Management Tools

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.osdeploy.com/guides/pscloudscript/pscloudscript-examples/osdcloud-winpe-and-oobe.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
