PowerShell: Initialize Disk to MBR or GPT in Windows 10/8/7

December 28, 2018

Disks must be initialized before they can be formatted and used to store different data in Windows, so here we would like to introduce how to use PowerShell to initialize disk to either the MBR or GPT disk styles.

Need to initialize (new) disk

Whenever you add a brand new disk to your Windows computer, you need to initialize it to MBR or GPT and format it to a compatible file system like NTFS or FAT32, then the Windows can read and write data on the disk. You might also need to consider initializing a disk when you meet some disk errors like “Disk unknown not initialized”.

Although it sounds like a tedious process, it’s not. Windows 10/8/7 provides several ways to initialize a (new) disk, including using PowerShell, Diskpart and Disk Management.

How to properly initialize a disk using PowerShell commands?

In this part, you’ll learn the steps to use PowerShell to initialize a disk, whether it’s a new one or old one. If it is a used disk with lots of files, but shows “not initialized, unallocated”, please do not initialize it immediately since this process will result in data loss. In such case, you can first recover data from the uninitialized disk via data recovery software.

Steps to use PowerShell initialize disk to MBR or GPT in Windows 10:

Step 1. Click Search box and input “powershell”, then right click the “Windows PowerShell” icon and select “Run as administrator” to launch PowerShell window.

Step 2. Type in “get-disk” and press “Enter” to get information about any disk attached to the current operating system. Then you can find the uninitialized disk is shown as “RAW”.

Step 3. Type in “initialize-disk n” and press “Enter”: n represents the disk number of the disk you need to initialize (here we initialize disk 2). 

Powershell Initialize Disk

Note:

  • This command won't return any output. To check whether the disk has been initialized successfully, you can type in “get-disk" again. In the screenshot above, you can see the disk2 is initialized to be GPT from RAW.

  • This command will initialize all disks as GPT by default, if you want to get an MBR disk, you need to use the "‑PartitionStyle" parameter: "Initialize-Disk 2 –PartitionStyle MBR".

To use the initialized disk, then you need to create partition and format it to a compatible system by taking further steps as below.

Step 4. Type in “New-Partition -DiskNumber 2 -AssignDriveLetter –UseMaximumSize” and press “Enter”. Input “get-partition” and you can find a new partition is created with a drive letter (G).

New Partition

Step 5. Type in “Format-Volume –DriveLetter G -FileSystem NTFS” and press “Enter” to format the new partition as NTFS file system.

Format Partition

After all the steps, you can store data in the new disk now.

A GUI tool to initialize disk in easier steps

If running the complex PowerShell commands is a headache for you, you can consider finding an alternative to PowerShell to initialize disk. Here we highly recommend an easy-to-use GUI tool –  AOMEI Partition Assistant Professional. With it, you will be able to initialize disks with much easier steps in Windows 10/8/7/XP/Vista.

Step 1. Install and run AOMEI Partition Assistant Pro in Windows PC. Right click the new disk and select “Initialize Disk”.

Initialize Disk

Step 2. In this mini window, you can initialize the disk to MBR or GPT depending on your requirements. Choose a proper disk style and click “OK”.

MBR GPT

Step 3. Click “Apply” and “Proceed” to commit the pending operation.

Apply

After initializing the disk successfully, you can create partition and format partition as well using this software.

Bottom Line

If you are not familiar with using PowerShell to initialize disk, AOMEI Partition Assistant Pro is a great choice. Besides, if you need to convert disk between MBR and GPT someday, this versatile software could also help you with that.