PSD
PSD copied to clipboard
Wipe all Disks in Pre-PSD wipes USB-Sticks
I love the new Pre-PSD menu (and the release in general). But I noticed that wiping all disks also wipes the USB stick (from which I booted).
PSDResources\Prestart\PSDPrestartMenu.ps1
'2' { Clear-Host Write-Host "Cleaning all disks" #Get-Disk | Clear-Disk -RemoveData -RemoveOEM -Confirm:$false -Verbose #Get-PhysicalDisk | Reset-PhysicalDisk -Verbose # Using diskpart due to issues with Clear-Disk # Borrowed (with pride) code snippet from David Segura $Disks = Get-Disk foreach ($Disk in $Disks){ $null = @" select disk $($Disk.number) clean exit "@ | diskpart.exe }
Changing line 75 to
$Disks = Get-Disk | Where-Object "bustype" -ne "usb"
should prevent that.