# 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

![](https://3996045416-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDKRxGiKLYjW1gana2O%2Fuploads%2FsfYIaavce1b4F1TNxhri%2Fimage.png?alt=media\&token=95fdd9de-7280-428a-a196-7e8ae4972d4e)

![](https://3996045416-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDKRxGiKLYjW1gana2O%2Fuploads%2FOhy1789BcRUCtyogtOHE%2Fimage.png?alt=media\&token=cd25e44b-b3ee-44fc-bbfc-062cff66201e)

![](https://3996045416-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDKRxGiKLYjW1gana2O%2Fuploads%2FXYM8PZ6cnFLpX65MeV26%2Fimage.png?alt=media\&token=14830a68-681f-49fc-aa51-bab56d0fd089)

![](https://3996045416-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDKRxGiKLYjW1gana2O%2Fuploads%2Fq0RTmcIL9cgpVvnuXKkK%2Fimage.png?alt=media\&token=8661de13-7cc4-4f77-a836-0e42f25c6084)

## OOBE

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

![](https://3996045416-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDKRxGiKLYjW1gana2O%2Fuploads%2FrDrDLKXaNpcFBEWPSP4y%2Fimage.png?alt=media\&token=06ff26b2-a59a-4f74-9289-0a983628eff6)

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

![](https://3996045416-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDKRxGiKLYjW1gana2O%2Fuploads%2FDmGSGFIzb3CGzVR2MMs0%2Fimage.png?alt=media\&token=cc2db6be-d560-4d6f-b257-e5009dd16140)

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

![](https://3996045416-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDKRxGiKLYjW1gana2O%2Fuploads%2FSZi4y2JdxoaDvNBZzbLp%2Fimage.png?alt=media\&token=5ce39f44-75e3-4fce-bb35-51b5fa4fc844)

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

![](https://3996045416-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDKRxGiKLYjW1gana2O%2Fuploads%2F1ssvaTAgelc8bWNIOrW7%2Fimage.png?alt=media\&token=1f19e4ee-1f91-469e-8bbb-b9894f299d07)

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

![](https://3996045416-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDKRxGiKLYjW1gana2O%2Fuploads%2F1kCyLdh0tdIjMsweI9Zh%2Fimage.png?alt=media\&token=a649b769-6bde-41c4-bb3b-f2a5b8d1c50d)

Windows Update was also enabled for Drivers and the Operating System

![](https://3996045416-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDKRxGiKLYjW1gana2O%2Fuploads%2FMWI2N8PN1BCceVpXt4NO%2Fimage.png?alt=media\&token=f7e0702b-dc7c-4f1e-8b0f-c34f8ea66cab)

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

![](https://3996045416-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDKRxGiKLYjW1gana2O%2Fuploads%2FYu8CB21ntW3U4BQRwBAN%2Fimage.png?alt=media\&token=69cd6cb0-1145-4de8-afa3-cfd4d6cfe1a6)

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 %}
