适用于: Windows Server (半年通道) ,Windows Server 2019,Windows Server 2016,Windows Server 2012 R2,Windows Server 2012Applies to: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

在基本 GUID 分区表 (gpt) 磁盘上,此命令会将 gpt 属性 (s) 分配给具有焦点的分区。On basic GUID partition table (gpt) disks, this command assigns the gpt attribute(s) to the partition with focus. Gpt 分区属性给出了有关分区使用的其他信息。Gpt partition attributes give additional information about the use of the partition. 一些属性特定于分区类型 GUID。Some attributes are specific to the partition type GUID.

你必须选择一个基本 gpt 分区,此操作才能成功。You must choose a basic gpt partition for this operation to succeed. 使用 " 选择分区" 命令 可选择基本 gpt 分区,并将焦点移动到该分区。Use the select partition command to select a basic gpt partition and shift the focus to it.


更改 gpt 属性可能会导致基本数据卷无法分配驱动器号,或阻止文件系统安装。Changing the gpt attributes might cause your basic data volumes to fail to be assigned drive letters, or to prevent the file system from mounting. 我们强烈建议您不要更改 gpt 属性,除非您是原始设备制造商 (OEM) 或熟悉 gpt 磁盘的 IT 专业人员。We strongly recommend that you don't change the gpt attributes unless you're an original equipment manufacturer (OEM) or an IT professional who's experienced with gpt disks.


gpt attributes=<n>


参数Parameter 说明Description
属性 =<n>attributes=<n> 指定要应用于具有焦点的分区的属性的值。Specifies the value for the attribute that you want to apply to the partition with focus. "Gpt 属性" 字段是包含两个子字段的64位字段。The gpt attribute field is a 64-bit field that contains two subfields. 较大的字段只能在分区 ID 的上下文中解释, 而较小的字段常用于所有分区 ID。The higher field is interpreted only in the context of the partition ID, while the lower field is common to all partition IDs. 接受的值包括:Accepted values include:
  • 0x0000000000000001 -指定计算机正确运行所需的分区。0x0000000000000001 - Specifies that the partition is required by the computer to function properly.
  • 0x8000000000000000 -指定在将磁盘移到另一台计算机时,或在计算机首次看到磁盘时,分区不会接收驱动器号。0x8000000000000000 - Specifies that the partition won't receive a drive letter by default when the disk is moved to another computer, or when the disk is seen for the first time by a computer.
  • 0x4000000000000000 -隐藏分区的卷,使其不会被装载管理器检测到。0x4000000000000000 - Hides a partition's volume so it's not detected by the mount manager.
  • 0x2000000000000000 -指定分区为另一分区的卷影副本。0x2000000000000000 - Specifies that the partition is a shadow copy of another partition.
  • 0x1000000000000000 -指定分区为只读。0x1000000000000000 - Specifies that the partition is read-only. 此属性可防止将卷写入到中。This attribute prevents the volume from being written to.

有关这些属性的详细信息,请参阅 "属性" 部分的 Create_PARTITION_PARAMETERS 结构For more information about these attributes, see the attributes section at create_PARTITION_PARAMETERS Structure.


  • EFI 系统分区只包含启动操作系统所需的二进制文件。The EFI System partition contains only those binaries necessary to start the operating system. 这使特定于操作系统的 OEM 二进制文件或二进制文件可以放在其他分区中。This makes it easy for OEM binaries or binaries specific to an operating system to be placed in other partitions.


若要防止计算机自动向分区分配驱动器号,请在移动 gpt 磁盘时,键入:To prevent the computer from automatically assigning a drive letter to the partition with focus, while moving a gpt disk, type:

gpt attributes=0x8000000000000000

其他参考Additional References