Rename a Drive Label with Set-Volume
Change the friendly name shown for any drive (its volume label) with a one-line PowerShell command.
01Command
$ Set-Volume -DriveLetter D -NewFileSystemLabel "Data"02What it does
The name next to a drive letter in Explorer is the volume label — 'Data', 'Backup', 'Photos' are far easier to tell apart than 'Local Disk'. Right-clicking and editing properties works, but Set-Volume does it in one line, which is handy in scripts that prepare new drives. The label is limited to 32 characters on NTFS and cannot contain tabs.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Get-Volume cmdlet | Microsoft LearnEvidence: Get-Volume lists volumes with their FileSystemLabel, which Set-Volume changes via -NewFileSystemLabel.
- Set-Volume cmdlet | Microsoft LearnEvidence: Set-Volume modifies a volume; -NewFileSystemLabel sets its label and -DriveLetter selects the target volume.
Last verified: 2026-09-19 · Category: Files & Folders
06Related solutions
One PowerShell line showing drive letters, labels, filesystems and free space for every volume.
Read-only PowerShell view of each disk's model, bus type, health and partition style.
Diagnose NTFS file system errors and bad sectors on any volume — including the system drive while Windows is running — before committing to a repair.