Create an Boot USB
Create a two-partition OSDCloud USB drive from completed OSDeploy Boot media.
Use New-OSDeployBootUSB to prepare a USB disk from a completed OSDeploy Boot build. The function clears the selected disk, creates boot and data partitions, copies the selected WinPE media, and adds local OSDCloud content when it is available and fits.
Create the USB Drive
Confirm the Requirements
Run the function on a workstation that meets these requirements:
Windows 11 25H2 build 26200 or later
PowerShell 7.6 or later installed from the MSI package
Current OSDeploy module
Administrator rights
curl.exeavailable inPATHOut-GridViewfor selecting the build and media folderA completed OSDeploy Boot build under
C:\ProgramData\OSDeployCore\bootAn online USB disk larger than 7 GB and smaller than 2000 GB
New-OSDeployBootUSB removes every partition and all data from the selected USB disk. Verify the disk number, model, and size before approving the clear operation. Use Update-OSDeployBootUSB when an existing OSDeploy USB only needs refreshed content.
Create the Partitions and Copy the Media
Open an elevated PowerShell 7.6 session and run:
New-OSDeployBootUSBSelect an eligible USB disk by number, choose a completed build, and select its bootmedia or bootmedia_ca2023 directory. The default command uses this layout:
Partition style
MBR
Boot partition
4 GB, FAT32, active
Boot label
OSDEPLOY
Data partition
Remaining space, NTFS
Data label
OSDCloud
Boot media
Interactive selection
Local OSDCloud content
Copy when present and space permits
The function lists eligible USB disks and prompts for a disk number. It then sets the machine-wide Explorer NoDriveTypeAutorun policy to 0xFF, opens selectors for the completed build and bootmedia or bootmedia_ca2023, clears and converts the disk to MBR, creates both partitions, and copies the selected media. Local content under C:\ProgramData\OSDeployCore\OSDCloud is copied to the NTFS partition when it exists and available space is sufficient.
Missing or oversized local OSDCloud content does not prevent creation of the bootable USB. The function writes a message and leaves the NTFS data partition without that optional content.
-WhatIf does not provide a read-only preview. It still changes the machine-wide AutoRun policy, and an already empty RAW or GPT disk can be initialized or converted to MBR before partition creation is suppressed.
For labels, selection rules, copy behavior, WhatIf, and returned objects, see New-OSDeployBootUSB. To refresh prepared media without repartitioning, see Update-OSDeployBootUSB. For compact syntax, see the New-OSDeployBootUSB command reference and Update-OSDeployBootUSB command reference.
Last updated
Was this helpful?

