Diskpart Windows — 10 Install
Yes. DiskPart recognizes NVMe, SATA, and even RAID drives as standard disks.
This path varies slightly but follows this logic:
A black window will appear. This is your cockpit. diskpart windows 10 install
Write-Host "`n⚠️ WARNING: All data on disk $diskNumber will be permanently deleted. ⚠️" -ForegroundColor Red $confirm = Read-Host "Type 'YES' to proceed" if ($confirm -ne "YES") Write-Host "Operation cancelled." -ForegroundColor Red exit
$diskpartScript = @" select disk $diskNumber clean convert gpt create partition efi size=100 format quick fs=fat32 label="System" assign letter="S" create partition msr size=16 create partition primary format quick fs=ntfs label="Windows" assign letter="W" list volume exit "@ A black window will appear
Absolutely. Open Command Prompt as Administrator and type diskpart. However, you cannot clean or modify the disk that holds your active Windows C: drive while inside Windows. That’s why we do it during the installer—from the recovery environment.
Now format the new partition with the NTFS file system. You can assign a label (name) to it here as well. $diskpartScript = @" select disk $diskNumber clean convert
format fs=ntfs quick label="Windows"
The quick flag ensures the format happens instantly rather than checking every sector for errors (which takes hours).
| Feature | GUI Setup | diskpart (WinPE) | Third-Party (GParted) |
|------------------|-----------|--------------------|----------------|
| Create MSR partition | No | Yes | Yes |
| Set partition flags (active/GUID) | No | Yes | Yes |
| Convert disk to GPT without data loss | No | convert gpt | Yes |
| Verify partition alignment | No | detail partition | Yes |
| Scriptable / Unattended | No | Yes (via diskpart /s script.txt) | Partial |
| Risk of mis-selection | Low | High | Medium |
Write-Host "`nAvailable disks:" -ForegroundColor Yellow Get-Disk | Select-Object Number, FriendlyName, Size, PartitionStyle | Format-Table -AutoSize
$diskNumber = Read-Host "`nEnter the disk number to install Windows 10 on"