diff --git a/docs/build.md b/docs/build.md index 76e6aa8..da20d45 100644 --- a/docs/build.md +++ b/docs/build.md @@ -620,7 +620,7 @@ During the build process, when **Build Deploy ISO** is enabled, the script creat You may want to disable Cleanup Deploy ISO in the following scenarios: -* **Creating deployment media separately**: When you want to create USB deployment drives at a later time (e.g. using `.\FFUDevelopment\USBImagingToolCreator.ps1`) +* **Creating deployment media separately**: When you want to create USB deployment drives at a later time, see [USB Imaging Tool Creator](/usb_imaging_tool_creator.html) for a staged workflow using `USBImagingToolCreator.ps1` with a deploy ISO, `FFU`, and `Drivers` folder (local path or network share). * **Testing in Hyper-V**: When deploying FFU images to Hyper-V VMs for testing, you can attach the deploy ISO directly to a VM as a DVD drive ## Cleanup Drivers diff --git a/docs/create_pemedia.md b/docs/create_pemedia.md new file mode 100644 index 0000000..c7b7720 --- /dev/null +++ b/docs/create_pemedia.md @@ -0,0 +1,91 @@ +--- +title: Create PE Media +nav_order: 1 +prev_url: /helper_scripts.html +prev_label: Helper Scripts +next_url: /usb_imaging_tool_creator.html +next_label: USB Imaging Tool Creator +parent: Helper Scripts +--- +# Create PE Media + +`Create-PEMedia.ps1` is a standalone helper script that creates WinPE capture or deployment ISO files outside the main build flow. + +This is useful when admins need to quickly generate a deploy ISO for a share (or local staging folder) that technicians will use with `USBImagingToolCreator.ps1`. + +## Common use case + +If your staging location does not already have a deployment ISO, run `Create-PEMedia.ps1` to generate one, then copy that ISO to the staging folder used by your technicians. + +## Prerequisites + +- Run from an elevated PowerShell session. +- Windows ADK + WinPE add-on must be installed (default path: `C:\Program Files (x86)\Windows Kits\10\`). +- Script should be run from the `FFUDevelopment` folder (or provide explicit paths via parameters). + +## Quick start (deploy ISO) + +From `FFUDevelopment`, this creates a deploy ISO by default: + +```powershell +.\Create-PEMedia.ps1 +``` + +Default output file: + +- `.\WinPE_FFU_Deploy_x64.iso` + +## Useful commands + +Create deploy ISO for x64: + +```powershell +.\Create-PEMedia.ps1 -Deploy $true -WindowsArch 'x64' +``` + +Create deploy ISO for ARM64: + +```powershell +.\Create-PEMedia.ps1 -Deploy $true -WindowsArch 'arm64' -DeployISO "$PSScriptRoot\WinPE_FFU_Deploy_arm64.iso" +``` + +Create capture ISO only: + +```powershell +.\Create-PEMedia.ps1 -Capture $true -Deploy $false +``` + +Create deploy ISO and include PE drivers from `.\PEDrivers`: + +```powershell +.\Create-PEMedia.ps1 -Deploy $true -CopyPEDrivers $true +``` + +## Stage output for USB imaging + +After creating the deploy ISO, place it in the same staging root used for USB media creation. + +Example: + +```text +\\Server\FFUStaging\ + WinPE_FFU_Deploy_x64.iso + FFU\ + .ffu + Drivers\ + +``` + +Then technicians can run: + +```powershell +.\USBImagingToolCreator.ps1 -DeployISOPath "\\Server\FFUStaging\WinPE_FFU_Deploy_x64.iso" -DisableAutoPlay +``` + +## Logging + +`Create-PEMedia.ps1` writes log output to: + +- `.\Create-PEMedia.log` (or custom path via `-LogFile`) + +{% include page_nav.html %} \ No newline at end of file diff --git a/docs/helper_scripts.md b/docs/helper_scripts.md new file mode 100644 index 0000000..87c65a4 --- /dev/null +++ b/docs/helper_scripts.md @@ -0,0 +1,20 @@ +--- +title: Helper Scripts +nav_order: 4 +prev_url: /ui_overview.html +prev_label: UI Overview +next_url: /create_pemedia.html +next_label: Create PE Media +has_children: true +has_toc: false +--- +# Helper Scripts + +This section documents standalone helper scripts used outside the primary UI-driven build workflow. + +## Available helper scripts + +- [Create PE Media](/create_pemedia.html) +- [USB Imaging Tool Creator](/usb_imaging_tool_creator.html) + +{% include page_nav.html %} diff --git a/docs/image/usb_imaging_tool_creator/1771882385742.png b/docs/image/usb_imaging_tool_creator/1771882385742.png new file mode 100644 index 0000000..01599ff Binary files /dev/null and b/docs/image/usb_imaging_tool_creator/1771882385742.png differ diff --git a/docs/usb_imaging_tool_creator.md b/docs/usb_imaging_tool_creator.md new file mode 100644 index 0000000..798c3d3 --- /dev/null +++ b/docs/usb_imaging_tool_creator.md @@ -0,0 +1,76 @@ +--- +title: USB Imaging Tool Creator +nav_order: 2 +prev_url: /create_pemedia.html +prev_label: Create PE Media +parent: Helper Scripts +--- +# USB Imaging Tool Creator + +`USBImagingToolCreator.ps1` is a standalone helper for creating one or more deployment USB drives from a deploy ISO, FFU files, and optional drivers. This is best used when you want to provide remote technicians the FFU file(s) you've built and optionally a drivers folder that contains the drivers for the models they will need to manage. They can also provide their own drivers (using Drivers\Make\Model format (e.g Drivers\Dell\Optiplex 7060 (085D)) + +## How the script works + +- `-DeployISOPath` is required and should point to the deploy ISO file. +- The script uses the parent folder of that ISO as its working root. +- FFU files are copied from `\FFU` (all `.ffu` files, recursive). +- Drivers are copied from `\Drivers` (recursive) when present. +- If drivers are not found, the script creates an empty `Drivers` folder on each deploy partition. +- `-DisableAutoPlay` is optional and temporarily disables AutoPlay for the current user during media creation. This is useful in situations where you see File Explorer pop ups as it's building the USB drive. + +## Network share workflow (admin/technician) + +For a shared workflow, stage one folder on a share with the deploy ISO and content that technicians should copy to USB drives. + +If you do not already have a deployment ISO in the staging location, create one first using [Create PE Media](/create_pemedia.html). This lets admins quickly generate the deploy ISO and then stage it for technicians using `USBImagingToolCreator.ps1`. + +Example layout: + +```text +\\Server\FFUStaging\ + WinPE_FFU_Deploy.iso + FFU\ + .ffu + Drivers\ + +``` + +Run from an elevated PowerShell session: + +```powershell +.\USBImagingToolCreator.ps1 -DeployISOPath "\\Server\FFUStaging\WinPE_FFU_Deploy.iso" -DisableAutoPlay +``` + +The script passes `-DeployISOPath` directly to `Mount-DiskImage`, so use a path the local Windows host can mount. + +## Example folder structure + +In this example a folder named USBCreator was made and the Drivers and FFU folders as well as the WinPE_FFU_Deploy_x64.iso and USBImagingToolCreator.ps1 files were copied from the FFUDevelopment folder to this new folder. + +![1771882385742](image/usb_imaging_tool_creator/1771882385742.png) + +## What happens when you run it + +1. Detects disks with media type **Removable media** or **External hard disk media**. +2. Prompts for a single drive selection or an all-drives selection. +3. Stops `mmc` and `diskpart` processes to reduce drive lock issues. +4. Erases each selected disk and rebuilds it as MBR with: + - `Boot` partition (2 GB, FAT32, active) + - `Deploy` partition (remaining space, NTFS) +5. Mounts the deploy ISO and copies all ISO content to every `Boot` partition. +6. Copies FFU content to every `Deploy` partition. +7. Copies driver content into `Deploy\Drivers` (or creates an empty `Drivers` folder). +8. Dismounts the ISO and reports completion. + +{: .warning-title} + +> Warning +> +> Selected disks are fully erased (`Clear-Disk -RemoveData -RemoveOEM`), so verify drive selection carefully, especially when using the all-drives option. + +## Logging and progress + +- Progress is shown in the PowerShell progress UI. +- `Script.log` is written in the same folder as the deploy ISO (the working root folder). + +{% include page_nav.html %}