mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Merge pull request #262 from jrollmann/UI_2508
Update USBImagingToolCreator.ps1
This commit is contained in:
@@ -28,7 +28,7 @@ function Write-ProgressLog {
|
|||||||
}
|
}
|
||||||
Function Get-RemovableDrive {
|
Function Get-RemovableDrive {
|
||||||
writelog "Get information for all removable drives"
|
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)) {
|
If($USBDrives -and ($null -eq $USBDrives.count)) {
|
||||||
$USBDrivesCount = 1
|
$USBDrivesCount = 1
|
||||||
} else {
|
} else {
|
||||||
@@ -62,6 +62,7 @@ Function Build-DeploymentUSB{
|
|||||||
$ScriptBlock = {
|
$ScriptBlock = {
|
||||||
param($DriveNumber)
|
param($DriveNumber)
|
||||||
Clear-Disk -Number $DriveNumber -RemoveData -RemoveOEM -Confirm:$false
|
Clear-Disk -Number $DriveNumber -RemoveData -RemoveOEM -Confirm:$false
|
||||||
|
Initialize-Disk -Number $DriveNumber
|
||||||
$Disk = Get-Disk -Number $DriveNumber
|
$Disk = Get-Disk -Number $DriveNumber
|
||||||
$PartitionStyle = $Disk.PartitionStyle
|
$PartitionStyle = $Disk.PartitionStyle
|
||||||
if($PartitionStyle -ne 'MBR'){
|
if($PartitionStyle -ne 'MBR'){
|
||||||
|
|||||||
Reference in New Issue
Block a user