大网数据广告活动
磁盘与文件系统

Convert a disk to GPT or MBR

· 52CE 我爱测

Learn how to convert a disk to GPT or MBR partition scheme (style) using Disk Management and the command line in Windows.

Master Boot Record (MBR) disks use the legacy BIOS partitioning scheme (also known as partition style) and supports up to four primary partitions per disk. MBR is limited to disks of 2 TB or smaller and isn't recommended for larger drives. GUID Partition Table (GPT) disks use the modern Unified Extensible Firmware Interface (UEFI), supports more than four partitions, and can manage disks larger than 2 TB.

You can convert a disk's partition style only if it doesn't contain any partitions or volumes. Make sure to delete all existing partitions or volumes before attempting to change the disk's format.

Prerequisites

You must be a member of the Administrators group (or have equivalent privileges) to convert a disk.

Important: Before you convert a disk, back up any data on the disk, and close any programs that access the disk.

Convert a disk

You can convert your disk using either the Disk Management tool or the command line. Follow these steps for your method of choice.

Disk Management

Before you convert partition styles, back up or move the data off the disk.

  1. Select Start, type diskmgmt.msc, then select Enter.

  2. Right-click on the volume pertaining to your disk.

  3. Select Delete Volume, then select Yes. Repeat this step for all volumes on the disk.

  4. Right-click on the disk, then select Convert to MBR Disk or Convert to GPT Disk.

  5. To verify the conversion process, right-click on your disk, select Properties, select the Volumes tab, and check the partition style information.

Diskpart

Before you convert partition styles, back up or move the data off the disk.

  1. Open an elevated command prompt window, type diskpart, then hit Enter.

  2. Prepare your disk for conversion by cleaning (deleting) any partitions or volumes.

    [!NOTE] If your disk doesn't have any partitions or volumes, skip to step 3 to convert your disk.

    1. Type list disk and hit Enter. Make a note of the disk number that you want to convert.

    2. Type select disk, provide the disk number you want to convert, then hit Enter.

    3. Type clean to delete all partitions and volumes on the disk.

  3. To convert GPT to MBR, type convert mbr, then hit Enter.

    To convert MBR to GPT, type convert gpt, then hit Enter.

You're notified when the conversion process completes. To learn more, see the diskpart commands reference.

PowerShell

Before you convert partition styles, back up or move the data off the disk.

  1. Open an elevated PowerShell window.

  2. Prepare your disk for conversion by cleaning (deleting) any partitions or volumes.

    [!NOTE] If your disk doesn't have any partitions or volumes, skip to step 3 to convert your disk.

    1. To list all disks, run the following command:

      Get-Disk
      

      Note the disk number you want to convert.

    2. To remove all partitions and volumes from the disk, run the following command. Replace <Disk Number> with the disk number you noted earlier:

      Clear-Disk -Number <Disk Number> -RemoveData -Confirm:$false
      
  3. To convert the partitioning style, run the following command:

    For MBR to GPT conversion:

    Initialize-Disk -Number <Disk Number> -PartitionStyle GPT
    

    For GPT to MBR conversion:

    Initialize-Disk -Number <Disk Number> -PartitionStyle MBR
    

    [!NOTE] Once a disk is initialized, you can't convert it to another partition style without first running the Clear-Disk cmdlet again.

  4. To verify the conversion process, run the following command and check the Partition Style column:

    Get-Disk
    

See also

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 06/17/2025
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。