Rename a Drive Label with Set-Volume

Change the friendly name shown for any drive (its volume label) with a one-line PowerShell command.

WindowsFilesdiskpowershellLow risk
Run `Set-Volume -DriveLetter D -NewFileSystemLabel "Data"` in PowerShell to rename the D: drive label to Data.

01Command

Command
$ 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

RiskLow risk

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Get-Volume cmdlet | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: Get-Volume lists volumes with their FileSystemLabel, which Set-Volume changes via -NewFileSystemLabel.
  • Set-Volume cmdlet | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: 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