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'){