how to wipe hard drive

Michelle Brown 0 Reputation points
2026-07-24T04:09:34.7533333+00:00

how can i use the command line on a surface book 2 to completely wipe the hard drive and reinstall a fresh os

Surface | Surface Book | Install and update
0 comments No comments

2 answers

Sort by: Most helpful
  1. S.Sengupta 31,626 Reputation points MVP Volunteer Moderator
    2026-07-24T09:19:28.09+00:00

    Before you begin

    Back up any files you want to keep.

    Ensure the Surface is plugged into power.

    [32 GB is large enough to fit any recovery image]

    Option 1: Wipe the drive using DiskPart (recommended)

    Boot into Windows Recovery Environment (WinRE):

    Turn the Surface off.

    Hold Shift while selecting Restart, or boot from a Windows installation USB and choose Repair your computer.

    Go to Troubleshoot → Advanced options → Command Prompt.

    Start DiskPart:

    Start DiskPart:

    diskpart

    List the disks:

    list disk

    Select the internal SSD (usually Disk 0):

    select disk 0

    Verify it's the correct disk:

    detail disk

    Erase the partition table:

    clean

    Or, for a full overwrite of every sector (takes much longer):

    clean all

    Exit DiskPart:

    exit

    At this point, the SSD is blank


    Option 2:

    Use the official Surface Recovery Image (recommended for Surface devices)

    Instead of a generic Windows installer, Microsoft provides a Surface recovery image containing the correct drivers and firmware for your exact Surface Book 2 model.

    This is often the best choice if you want the device restored to factory software.

    Useful DiskPart commands

    diskpart

    list disk

    select disk 0

    detail disk

    clean

    convert gpt

    exit


    After reinstalling, immediately grab Surface-specific drivers/firmware from the Surface Driver and Firmware Update pack for Surface Book 2, since Windows Update sometimes lags on Surface-specific components









    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-07-24T04:09:54.9+00:00

    For a Surface Book 2, the supported way to completely wipe the drive and reinstall Windows is to use a Surface USB recovery drive.

    Important: this process deletes all personal files, resets settings, and removes installed apps. Creating or reformatting the USB drive also erases everything on that USB drive.

    1. On a working Windows PC, download the correct Surface recovery image for the Surface Book 2.
    2. Prepare a USB drive:
      • 32 GB is large enough for any recovery image.
      • It must be FAT32.
      • USB 3.0 or higher is recommended.
    3. Create the recovery USB in Windows:
      • Open Start and search for Recovery Drive.
      • Select Create a recovery drive.
      • In User Account Control, select Yes.
      • Clear the Back up system files to the recovery drive checkbox.
      • Select the USB drive, then Next > Create.
    4. Open the downloaded recovery image .zip file and copy all files from it to the USB recovery drive. If prompted, select Replace the files in the destination.
    5. Boot the Surface Book 2 from the USB recovery drive.
    6. In recovery:
      • Choose the language.
      • Choose the keyboard layout.
      • Select Troubleshoot.
      • Select Reset your PC.
      • Select Next.
      • Select Yes, repartition the drives.
      • Select Just remove my files or Fully clean the drive.
      • Select Reset.

    If the Surface does not boot from the USB drive, check Surface UEFI:

    • Enable Boot from USB devices must be On.
    • If a boot order is configured, Enable alternate boot sequence must be On.
    • If needed, reformat the USB as FAT32.

    If the USB must be reformatted from command line, these diskpart steps are provided in the Surface USB boot guidance. Warning: clean erases the selected disk completely, so selecting the wrong disk will destroy its data.

    diskpart
    list disk
    select disk X
    clean
    create part pri
    select part 1
    format fs=fat32 quick
    active
    

    For Surface Book 2 specifically, note that the current Surface Data Eraser tool is not supported on legacy devices such as Surface Book 2 and earlier.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.