From 556cfa1ee38cb09ce1818b72787732dc124a47d7 Mon Sep 17 00:00:00 2001 From: jrollmann <81248392+jrollmann@users.noreply.github.com> Date: Wed, 27 Aug 2025 17:07:52 -0400 Subject: [PATCH] Update USBImagingToolCreator.ps1 --- FFUDevelopment/USBImagingToolCreator.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FFUDevelopment/USBImagingToolCreator.ps1 b/FFUDevelopment/USBImagingToolCreator.ps1 index e5afece..9a1ae4e 100644 --- a/FFUDevelopment/USBImagingToolCreator.ps1 +++ b/FFUDevelopment/USBImagingToolCreator.ps1 @@ -28,7 +28,7 @@ function Write-ProgressLog { } Function Get-RemovableDrive { writelog "Get information for all removable drives" -$USBDrives = Get-WmiObject Win32_DiskDrive | Where-Object {$_.MediaType -eq "Removable media"} +$USBDrives = Get-WmiObject Win32_DiskDrive | Where-Object {$_.MediaType -eq "Removable media" -or $_.MediaType -eq "External hard disk media"} If($USBDrives -and ($null -eq $USBDrives.count)) { $USBDrivesCount = 1 } else { @@ -62,6 +62,7 @@ Function Build-DeploymentUSB{ $ScriptBlock = { param($DriveNumber) Clear-Disk -Number $DriveNumber -RemoveData -RemoveOEM -Confirm:$false + Initialize-Disk -Number $DriveNumber $Disk = Get-Disk -Number $DriveNumber $PartitionStyle = $Disk.PartitionStyle if($PartitionStyle -ne 'MBR'){