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

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

Syntax:  UNIQUEID DISK [ID={ | }]  [NOERR]

    ID={ | }

                For MBR disks, you can specify a four-byte (DWORD) value in
                hexadecimal form for the signature.
                
                For GPT disks, specify 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 the NOERR parameter, an error causes DiskPart to exit
                with an error code.

    A disk must be selected for this operation to succeed.  This command works
    on basic and dynamic disks.

Example:

    UNIQUEID DISK
    UNIQUEID DISK ID=5f1b2c36
    UNIQUEID DISK ID=baf784e7-6bbd-4cfb-aaac-e86c96e166ee
English
English (United States)
Deutsch (Deutschland)
German (Germany)
Español (España)
Spanish (Spain)
italiano
Italian
日本語
Japanese
한국어
Korean
Português
Portuguese
Русский
Russian