The essentials

Quick reference

One focused task per row. Jump to the related section for complete, working examples.

UseSyntaxExamples
List volumeslist volumeView examples
Select a volumeselect volume 7View examples
Show all volume pathsdetail volumeView examples
Assign a drive letterassign letter=RView examples
Assign the next free letterassignView examples
Remove a drive letterremove letter=RView examples
Assign a folder mount pointassign mount=C:\Mounts\ArchiveView examples
Remove a folder mount pointremove mount=C:\Mounts\ArchiveView examples
Remove every pathremove allView examples
Show automount stateautomountView examples
Enable automountautomount enableView examples
Disable automountautomount disableView examples
Scrub stale mount dataautomount scrubView examples
Suppress a default letterattributes volume set nodefaultdriveletterView examples
Allow a default letterattributes volume clear nodefaultdriveletterView examples
Verify final pathsdetail volumeView examples

Drive letters and folder mount points are names for volumes, not volume identity. Changing either can break applications, services, shares, scheduled tasks, backup policies, and user shortcuts even when the filesystem remains intact. Resolve the selected volume to its disk and partition, inventory every current path, coordinate consumers, and verify the new path before removing the old one.

Step by step

Detailed examples

01

Identify the volume independently of its path

Letters can be reassigned and labels can be duplicated. Match volume number with unique identity where available, disk, partition, filesystem, size, label, and application owner. Detail volume shows paths and related disk information. Capture this output before changes so rollback restores the exact previous paths.

Read-only mount inventory
list volume
select volume 7
detail volume
attributes volume
rem Stop if disk, partition, size, filesystem, or owner is unexpected.
Back to quick reference ↑
02

Coordinate every drive-letter change

Assign fails if the requested letter is occupied. Windows also restricts letters on system, boot, paging, OEM, and non-basic-data GPT partitions. Before removal, search services, shares, tasks, applications, scripts, and backup jobs for the old path. Keeping old and new paths temporarily can simplify migration when the workload permits it.

Assign and verify an approved letter
select volume 7
detail volume
assign letter=R
detail volume
exit
Test-Path R:\
Back to quick reference ↑
03

Use empty NTFS or ReFS folders as mount points

The host folder must already exist, be empty, and reside on an NTFS or ReFS volume. A folder mount point avoids consuming a drive letter but inherits availability dependencies from both the host volume and mounted volume. Removing the mount point does not erase the mounted data; remove all is broader and can disconnect every path.

Create the host folder before entering DiskPart
New-Item -ItemType Directory -Path C:\Mounts\Archive -Force
Get-ChildItem -Force C:\Mounts\Archive
Assign the selected volume to the folder
select volume 7
detail volume
assign mount=C:\Mounts\Archive
detail volume
Back to quick reference ↑
04

Treat automount as a system-wide policy

Automount affects newly discovered basic volumes, not just the selected volume. Disabling it can be appropriate for imaging, forensics, or controlled server storage, but can surprise operators and automation. Scrub removes stale mount metadata for volumes no longer present; it is not a general cleanup command for active mounts. Record the prior state before changing it.

Review automount and storage inventory
automount
list volume
rem Change policy only under a host-wide storage standard.
Back to quick reference ↑
05

Use volume attributes for persistent intent

The nodefaultdriveletter attribute prevents normal automatic letter assignment on supported basic GPT volumes. It does not hide data from administrators, enforce security, or remove an already assigned path. Pair it with explicit path removal only after verifying the volume type and consumer impact.

Suppress future default-letter assignment
select volume 7
detail volume
attributes volume
attributes volume set nodefaultdriveletter
attributes volume
Back to quick reference ↑
06

Test paths and consumers before closing the change

Repeat detail volume and list volume, then test the filesystem path, expected permissions, service startup, shares, backups, monitoring, and application access. When migrating a path, verify the new path first and retain a documented reversal command. A successful assign or remove only proves the mount-manager change was accepted.

Verify a folder-mounted volume
detail volume
list volume
exit
Get-Item C:\Mounts\Archive
Get-ChildItem C:\Mounts\Archive -Force | Select-Object -First 10
Back to quick reference ↑

Sources and further reading

References

Authoritative documentation used to verify and expand this cheat sheet.

  1. Microsoftassignlearn.microsoft.com
  2. Microsoftremovelearn.microsoft.com
  3. Microsoftautomountlearn.microsoft.com
  4. MicrosoftAssign a mount point folder path to a drivelearn.microsoft.com
  5. Microsoftattributes volumelearn.microsoft.com

Help us improve

Found a typo or missing example?

Tell us what would make this cheat sheet clearer, more complete, or more useful.

Share feedback