Diskpart Windows 10 Install [top] Jun 2026
Diskpart is a powerful command-line tool built into Windows that allows you to manage drives, partitions, and volumes directly. Using Diskpart during a Windows 10 installation ensures a clean, properly formatted drive, preventing common setup errors.
. This tool is essential for troubleshooting "cannot install" errors or for manually preparing a disk for a clean installation. Microsoft Learn Quick Setup Guide
$scriptPath = "$env:TEMP\diskpart_win10.txt" $diskpartScript | Out-File -FilePath $scriptPath -Encoding ascii
Resolving the common "Windows cannot be installed to this disk. The selected disk is of the GPT/MBR partition style" error. diskpart windows 10 install
DISKPART> create partition primary DISKPART> format quick fs=ntfs label="Windows" Use code with caution.
clean
How to use the Diskpart Utility preparing to install Windows Diskpart is a powerful command-line tool built into
Insert your bootable USB drive, restart your computer, and enter your BIOS/UEFI settings to select the USB as the primary boot device. 2. Access the Command Prompt
create partition primary : Creates a new primary partition using the remaining space.
Type active and press ( Note: The active command is only applicable/necessary for MBR/Legacy BIOS installations; skip this step if you converted to GPT ). 6. Format the Volume This tool is essential for troubleshooting "cannot install"
Creating custom EFI system partitions, recovery partitions, or primary data partitions before the OS files are copied. Step 1: Access Diskpart from the Windows 10 Installer
On the first screen (Language and Keyboard selection), press on your keyboard. A black Command Prompt window will instantly appear. Type diskpart and press Enter .
To use all remaining space: create partition primary
If you want to manually configure the required system architecture partitions for a UEFI system, execute the following commands in sequence after running convert gpt :