Uniqueid


Applies To: Windows Server 2008,Windows Server 2008 R2,Windows 7

Displays or sets the GUID partition table (GPT) identifier or master boot record (MBR) signature for the disk with focus.

Important

This DiskPart command is not available in any edition of Windows Vista.

Syntax


Copy Code

uniqueid disk [id={<dword> | <GUID>}] [noerr]

Parameters

Parameter

Description

id={<dword> | <GUID>}

For MBR disks, specifies a four-byte (DWORD) value in hexadecimal form for the signature.

For GPT disks, specifies a GUID for the identifier.

noerr

For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Remarks

Examples

To display the signature of the MBR disk with focus, type:


Copy Code

uniqueid disk

To set the signature of the MBR disk with focus to 5f1b2c36, type:


Copy Code

uniqueid disk id=5f1b2c36

To set the identifier of the GPT disk with focus to baf784e7-6bbd-4cfb-aaac-e86c96e166ee, type:


Copy Code

uniqueid disk id=baf784e7-6bbd-4cfb-aaac-e86c96e166ee

Additional references

Command-Line Syntax Key

DiskPart