The labels of disk drives(volumes) can be changed from windows command line using label command. In the command, we need to specify the drive letter for which we need to change the label. Note that drive letter and drive label are different. In the below snapshot, drive letter is C: and drivel label is ‘Windows 7‘
Command to change drive label:
label driveletter label
To set the label Windows for the drive C: the command is
label C: Windows
We can execute this command only from elevated administrator command prompt. Running the command from a normal command prompt would generate the below error.
C:\> label c: Windows Access Denied as you do not have sufficient privileges. You have to invoke this utility running in elevated mode.
How to format disk volume from windows command line