cheat sheet
mountvol
List, create, and remove NTFS volume mount points and display the unique volume GUID path for any drive letter or directory junction from the command prompt.
mountvol — Volume Mount Point Manager
What it is
mountvol is a built-in Windows command for listing all mounted volumes and managing NTFS volume mount points — the ability to attach a volume at an arbitrary directory path rather than a drive letter. A volume mounted at C:\Data\Archive is accessible through the path just like a folder, while consuming no drive letter. Use it to expose volumes with GUID paths in scripts, create or remove directory mount points, and list which GUID corresponds to which volume. The PowerShell equivalent is Get-Volume and Add-PartitionAccessPath.
Availability
mountvol ships as C:\Windows\System32\mountvol.exe on Windows 2000 and later. Creating or removing mount points requires Administrator privileges and an NTFS target directory.
mountvol /?
Output:
Creates, deletes, or lists a volume mount point.
MOUNTVOL [drive:]path VolumeName
MOUNTVOL [drive:]path /D
MOUNTVOL [drive:]path /L
MOUNTVOL [drive:]path /P
MOUNTVOL /R
MOUNTVOL /N
MOUNTVOL /E
MOUNTVOL drive: /S
path Specifies the existing NTFS directory where the mount
point will reside.
VolumeName Specifies the volume name that is the target of the
mount point.
/D Removes the volume mount point from the specified directory.
/L Lists the mounted volume name for the specified directory.
/P Removes the volume mount point from the specified directory,
dismounts the volume, and makes the volume not mountable.
You can make the volume mountable again by creating a volume
mount point.
/R Removes volume mount point directories and registry settings
for volumes that are no longer in the system.
/N Disables automatic mounting of new volumes.
/E Re-enables automatic mounting of new volumes.
/S Mount the EFI system partition on the given drive.
Syntax
mountvol [path] [VolumeName | /D | /L | /P]
mountvol /R | /N | /E
Output: (volume list or operation result)
Essential options
| Switch | Meaning |
|---|---|
| (no args) | List all volumes with their drive letter and GUID path |
path VolumeName | Mount the volume (GUID path) at the given directory |
path /D | Remove the mount point at the given directory |
path /L | Show the volume GUID for the path |
path /P | Remove the mount point and dismount the volume |
/R | Clean up stale mount point entries for removed volumes |
/N | Disable automatic drive-letter assignment for new volumes |
/E | Re-enable automatic drive-letter assignment |
drive: /S | Mount the EFI system partition at the drive letter |
Listing all volumes
Running mountvol with no arguments lists every volume visible to Windows with its current drive letter (if assigned) and its GUID path. The GUID path is the canonical reference that survives drive-letter reassignment.
mountvol
Output:
Possible values for VolumeName along with current mount points are:
\\?\Volume{a1b2c3d4-e5f6-7890-abcd-ef1234567890}\
C:\
\\?\Volume{f0e1d2c3-b4a5-6789-fedc-ba9876543210}\
D:\
\\?\Volume{01234567-89ab-cdef-0123-456789abcdef}\
*** NO MOUNT POINTS ***
Querying a volume's GUID path (/L)
/L returns the GUID path for the volume mounted at a given drive letter or directory. This is useful in scripts that need to pass a stable volume reference to chkdsk, fsutil, or diskpart.
mountvol C: /L
Output:
\\?\Volume{a1b2c3d4-e5f6-7890-abcd-ef1234567890}\
Creating a directory mount point
To mount a volume at a directory, provide the target path (which must be an empty NTFS folder) and the volume GUID path. After mounting, the directory transparently exposes the volume's contents.
rem Create the mount directory
mkdir C:\Data\Archive
rem Mount the volume at the directory
mountvol C:\Data\Archive \\?\Volume{f0e1d2c3-b4a5-6789-fedc-ba9876543210}\
Output:
(none — exits 0 on success)
rem Verify the mount point exists
mountvol C:\Data\Archive /L
Output:
\\?\Volume{f0e1d2c3-b4a5-6789-fedc-ba9876543210}\
Removing a mount point (/D)
/D detaches the volume from the directory mount point but leaves the volume intact and its data accessible by other means (such as a drive letter). The directory remains after removal.
mountvol C:\Data\Archive /D
Output:
(none — exits 0 on success)
Dismounting and preventing remount (/P)
/P removes the mount point, dismounts the volume, and marks it as not auto-mountable. Use this before physically hot-swapping a drive or before passing a disk to a backup job that needs exclusive access. Run mountvol C:\Data\Archive <GUID> afterward to make it accessible again.
mountvol C:\Data\Archive /P
Output:
(none — exits 0 on success)
Controlling automount (/N and /E)
By default Windows automatically assigns a drive letter whenever a new volume is attached. /N disables this behavior — useful on servers where unknown external drives should not appear automatically. /E restores the default.
rem Disable auto-mount (server hardening)
mountvol /N
Output:
(none — exits 0 on success)
rem Re-enable auto-mount
mountvol /E
Output:
(none — exits 0 on success)
How a mount point actually works
A volume mount point is an NTFS reparse point with the directory junction tag (0xA0000003) whose payload is a substitute volume GUID path. When any file API touches the directory, the I/O Manager translates the path through the reparse data and redirects the operation to the target volume's root. The behaviour is transparent to applications — dir C:\Data\Archive reads the mounted volume's root just like any other folder.
rem Confirm a mount-point folder is a reparse point
fsutil reparsepoint query C:\Data\Archive
Output:
Reparse Tag Value : 0xa0000003
Tag value: Microsoft
Tag value: Name Surrogate
Tag value: Mount Point
Reparse Data Length: 0x0000004c
Reparse Data:
0000: 46 00 48 00 00 00 48 00 5c 00 3f 00 3f 00 5c 00 F.H...H.\.?.?.\.
0010: 56 00 6f 00 6c 00 75 00 6d 00 65 00 7b 00 66 00 V.o.l.u.m.e.{.f.
0020: 30 00 65 00 31 00 64 00 32 00 63 00 33 00 2d 00 0.e.1.d.2.c.3.-.
...
Because the mount point is a reparse point, fsutil reparsepoint delete is an equivalent way to remove the mount — but it leaves the directory entry empty and intact, just like mountvol /D.
Drive letters vs mount points vs GUID paths
A single volume can be reached through up to three classes of access paths at the same time:
| Access path | Example | Persistent? | Stable across reboots? |
|---|---|---|---|
| Drive letter | D:\ | Yes (in MountedDevices registry key) | Yes, unless drive letter is reassigned. |
| Directory mount point | C:\Data\Archive\ | Yes (NTFS reparse data on the directory) | Yes, even if drive letter changes. |
| Volume GUID path | \\?\Volume{f0e1d2c3-...}\ | Yes (assigned at volume creation) | Yes, including across hardware swaps that preserve the volume. |
The GUID path is the truly stable identifier — it survives drive-letter reassignment and even moving the disk to a different machine. Scripts that reference volumes by drive letter break when letters are reshuffled; scripts using the GUID path don't.
rem Get the GUID for D: and use it in a way that survives D: being remapped
for /f "tokens=* delims= " %V in ('mountvol D: /L') do set VOL=%V
echo Volume: %VOL%
rem Pass the GUID directly to other tools
chkdsk %VOL% /scan
Output:
Volume: \\?\Volume{f0e1d2c3-b4a5-6789-fedc-ba9876543210}\
The type of the file system is NTFS.
Stage 1: Examining basic file system structure ...
Stage 2: Examining file name linkage ...
Stage 3: Examining security descriptors ...
Stage 4: Looking for bad sectors in user file data ...
Windows has scanned the file system and found no problems.
EFI System Partition mounting (/S)
The EFI System Partition (ESP) is the FAT32 partition that the firmware reads to find the bootloader. By default it has no drive letter — Windows hides it from Explorer to prevent accidental modification. mountvol drive: /S is the supported way to mount it temporarily for inspection or bcdboot repair work.
rem Mount the ESP at S: (must be run from Administrator)
mountvol S: /S
Output:
(no output — exits 0 on success)
rem Now you can browse the ESP
dir S:\EFI\Microsoft\Boot
Output:
Directory of S:\EFI\Microsoft\Boot
01/01/2026 09:15 <DIR> .
01/01/2026 09:15 <DIR> ..
01/01/2026 09:15 27,648 BCD
01/01/2026 09:15 65,536 BCD.LOG
01/01/2026 09:15 212,496 bootmgfw.efi
01/01/2026 09:15 212,496 bootmgr.efi
01/01/2026 09:15 <DIR> en-US
01/01/2026 09:15 <DIR> Fonts
01/01/2026 09:15 <DIR> Resources
rem Done — remove the assignment (does NOT dismount the underlying volume)
mountvol S: /D
Output:
(no output — exits 0 on success)
If bcdedit is the boot-store editor, mountvol /S is how you put the boot store on disk so bcdedit can find it from a maintenance OS. See sections/windows/bcdedit.
PowerShell equivalents
PowerShell's Storage module covers the same workflows in object-returning cmdlets.
mountvol operation | PowerShell |
|---|---|
| List all volumes | Get-Volume or `Get-Partition |
| Show GUID path for a drive | (Get-Volume X).Path or (Get-Partition -DriveLetter X).AccessPaths |
| Create directory mount | Add-PartitionAccessPath -DiskNumber N -PartitionNumber M -AccessPath C:\Data\Archive |
| Remove directory mount | Remove-PartitionAccessPath -DiskNumber N -PartitionNumber M -AccessPath C:\Data\Archive |
| Dismount volume | `Get-Disk N |
| Enable / disable automount | `Set-StorageSetting -NewDiskPolicy OnlineAll |
| Mount EFI System Partition | Add-PartitionAccessPath -DiskNumber 0 -PartitionNumber 1 -AccessPath S:\ |
| Cleanup stale mounts | `Get-Partition |
# List every volume and every path it's accessible through
Get-Partition | Where-Object { $_.AccessPaths -and $_.Type -ne 'Reserved' } |
Select DiskNumber, PartitionNumber,
@{n='Letter';e={ $_.DriveLetter }},
@{n='Paths';e={ ($_.AccessPaths -join ', ') }}
Output:
DiskNumber PartitionNumber Letter Paths
---------- --------------- ------ -----
0 2 C C:\, \\?\Volume{a1b2c3d4-e5f6-7890-abcd-ef1234567890}\
1 1 D D:\, C:\Data\Archive\, \\?\Volume{f0e1d2c3-b4a5-6789-fedc-ba9876543210}\
2 1 \\?\Volume{01234567-89ab-cdef-0123-456789abcdef}\
# Mount disk 1, partition 1 at C:\Data\Archive
Add-PartitionAccessPath -DiskNumber 1 -PartitionNumber 1 -AccessPath C:\Data\Archive
Output:
(no output on success)
# Remove a directory mount
Remove-PartitionAccessPath -DiskNumber 1 -PartitionNumber 1 -AccessPath C:\Data\Archive
Output:
(no output on success)
# Mount the EFI System Partition for inspection
Add-PartitionAccessPath -DiskNumber 0 -PartitionNumber 1 -AccessPath S:\
Output:
(no output on success)
# Resolve drive letter -> GUID path via Get-Volume
Get-Volume -DriveLetter D | Select DriveLetter, Path, FileSystemLabel, FileSystemType, Size, SizeRemaining
Output:
DriveLetter Path FileSystemLabel FileSystemType Size SizeRemaining
----------- ---- --------------- -------------- ---- -------------
D \\?\Volume{f0e1d2c3-b4a5-6789-fedc-ba9876543210}\ Data NTFS 2000398934016 905134669824
Mount-DiskImage for VHD/ISO
mountvol is for managing existing volume mount points; Mount-DiskImage is the PowerShell cmdlet that turns a .vhd, .vhdx, or .iso file into a mounted volume in the first place. After the image is mounted, mountvol lists it like any other volume.
# Mount an ISO and find its drive letter
$img = Mount-DiskImage -ImagePath D:\ISOs\Windows.iso -StorageType ISO -PassThru
$letter = ($img | Get-Volume).DriveLetter
"ISO mounted at ${letter}:"
Output:
ISO mounted at H:
# Mount a VHDX as read-write
Mount-DiskImage -ImagePath C:\VMs\lab.vhdx -StorageType VHDX -Access ReadWrite -PassThru |
Get-Disk |
Initialize-Disk -PartitionStyle GPT -PassThru |
New-Partition -UseMaximumSize -DriveLetter Q |
Format-Volume -FileSystem NTFS -NewFileSystemLabel 'Lab' -Confirm:$false
Output:
DriveLetter FileSystemLabel FileSystemType DriveType HealthStatus OperationalStatus SizeRemaining Size
----------- --------------- -------------- --------- ------------ ----------------- ------------- ----
Q Lab NTFS Fixed Healthy OK 49.93 GB 50.00 GB
# Dismount when finished
Dismount-DiskImage -ImagePath D:\ISOs\Windows.iso
Dismount-DiskImage -ImagePath C:\VMs\lab.vhdx
Output:
Attached : False
ImagePath : D:\ISOs\Windows.iso
Attached : False
ImagePath : C:\VMs\lab.vhdx
Persistent vs ephemeral mounts
A mountvol directory mount is persistent: it survives reboots because the reparse data on the host directory is part of the host volume's NTFS metadata. Auto-mounted drive letters (assigned by Windows when a removable drive is inserted) are also persistent — recorded in HKLM\SYSTEM\MountedDevices.
rem Inspect the persistence registry — every persistent mount is in here
reg query "HKLM\SYSTEM\MountedDevices" /s
Output:
HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
\??\Volume{a1b2c3d4-e5f6-7890-abcd-ef1234567890} REG_BINARY 5C003F003F005C00...
\DosDevices\C: REG_BINARY 5C003F003F005C00...
\DosDevices\D: REG_BINARY 5C003F003F005C00...
\DosDevices\E: REG_BINARY 5C003F003F005C00...
rem Force Windows to forget a stale assignment (e.g. removed USB key still claiming a letter)
mountvol /R
Output:
(no output — exits 0 on success)
/R cleans up stale entries for volumes that no longer exist, freeing the letters they were squatting on.
Folder-redirected data layouts
A common server-room layout is a single OS drive (C:) with very fast SSD and one or more huge HDDs mounted under C:\Data rather than getting their own drive letters. This gives applications a single backup path tree, lets backups recurse into one folder, and keeps drive letters from getting cluttered.
@echo off
rem Standardize layout:
rem C: - OS
rem C:\Data\Archive -> Volume D: (HDD)
rem C:\Data\Media -> Volume E: (HDD)
rem C:\Data\Scratch -> Volume F: (NVMe)
mkdir C:\Data\Archive 2>NUL
mkdir C:\Data\Media 2>NUL
mkdir C:\Data\Scratch 2>NUL
for /f %V in ('mountvol D: /L') do set ARCH=%V
for /f %V in ('mountvol E: /L') do set MEDI=%V
for /f %V in ('mountvol F: /L') do set SCRT=%V
mountvol C:\Data\Archive %ARCH%
mountvol C:\Data\Media %MEDI%
mountvol C:\Data\Scratch %SCRT%
rem Optional: remove the drive letters so the volumes are only reachable through C:\Data
mountvol D: /D
mountvol E: /D
mountvol F: /D
dir C:\Data
Output:
Directory of C:\Data
05/25/2026 03:14 PM <JUNCTION> Archive [\\?\Volume{f0e1d2c3-b4a5-6789-fedc-ba9876543210}\]
05/25/2026 03:14 PM <JUNCTION> Media [\\?\Volume{a2b3c4d5-e6f7-8901-bcde-fa1234567890}\]
05/25/2026 03:14 PM <JUNCTION> Scratch [\\?\Volume{b3c4d5e6-f708-9012-cdef-ab1234567890}\]
3 Dir(s) 234,789,123,456 bytes free
Detecting and reporting volume health by GUID
When something fails on \\?\Volume{...}, the drive letter (if any) is often not in the error message. Reverse-resolve the GUID to find what's affected.
function Get-VolumeFromGuidPath {
param([Parameter(Mandatory)][string]$Path)
Get-Volume | Where-Object { $_.Path -eq $Path } |
Select DriveLetter, FileSystemLabel, FileSystemType, HealthStatus,
@{n='SizeGB';e={[math]::Round($_.Size/1GB,1)}},
@{n='FreeGB';e={[math]::Round($_.SizeRemaining/1GB,1)}}
}
Get-VolumeFromGuidPath -Path '\\?\Volume{f0e1d2c3-b4a5-6789-fedc-ba9876543210}\'
Output:
DriveLetter : D
FileSystemLabel : Data
FileSystemType : NTFS
HealthStatus : Healthy
SizeGB : 1862.4
FreeGB : 843.2
Cross-references: where mountvol fits in the toolchain
| Tool | When to use |
|---|---|
mountvol | List mounts, create/remove directory mount points, manage EFI mount. |
diskpart assign / Add-PartitionAccessPath | Same operation, with extra options (size, letter, etc.). See sections/windows/diskpart. |
Mount-DiskImage / Dismount-DiskImage | Mount ISO / VHD / VHDX files. |
fsutil reparsepoint query | Inspect the underlying reparse data of a mount point. See sections/windows/fsutil. |
fsutil volume list | List volume GUID paths. |
Get-Volume / Get-Partition | Inventory with object output. |
chkdsk \\?\Volume{...} | Run integrity check by GUID path. See sections/windows/chkdsk. |
bcdedit /enum | Boot store editing once the EFI partition is mounted. See sections/windows/bcdedit. |
dism /Image:<mounted-vhd> | Service mounted images by directory path. See sections/windows/dism. |
mklink /J path target | Alternative junction that points to another directory, not a volume. |
Common pitfalls
- Target directory must be empty —
mountvolfails if the target path contains any files; create a fresh empty folder and use that. - Target must be on an NTFS volume — FAT32 or exFAT directories cannot host mount points; the host volume (e.g. C:) must be NTFS.
- Volume GUID path must end with a backslash —
\\?\Volume{...}\(trailing\) is required; omitting it returns "The filename, directory name, or volume label syntax is incorrect". /Dremoves the mount point but not the folder — the empty directory remains and can be reused; delete it withrmdirif no longer needed.- Drive-letter assignments are unaffected by
/P— if the volume also has a drive letter (e.g. D:),/Premoves only the directory mount point; the drive letter persists until reassigned elsewhere. mountvol /Nis global — disabling automount affects every new disk, including USB sticks plugged in by the user; document the change in the build manifest.- The EFI System Partition mount is volatile —
mountvol S: /Sdoes not persist across reboots; remount it from WinRE every time you need it. - Deleting a mount-point folder with files inside deletes them on the target volume — Windows will warn, but if you confirm, the data inside the mounted volume is gone; always
mountvol /Dfirst. - Cross-volume operations don't cross mount points transparently for hard links —
mklink /Honly works within a single volume; a hard link from a host volume to a file inside a mounted child volume fails. mountvol C:\Data\Archivewith C: not NTFS fails silently with a misleading error — verify withfsutil fsinfo volumeinfo C:before troubleshooting other issues.mountvol /Rremoves registry entries only for volumes Windows knows are gone — if a volume is offline rather than removed,/Rleaves the entry in place; bring the disk back, then run/R.- The GUID path is case-sensitive in some APIs — copy/paste it rather than typing it; the surrounding braces and hyphens must match exactly.
- Storage Spaces virtual disks present as ordinary volumes to
mountvol— you can mount them at directory paths just like physical-disk volumes, butRepair-VirtualDiskis what restores resilience, notchkdsk. - Mounting a removable volume at a directory makes ejection unsafe via Explorer — Windows hides the "Safely Remove" option for the underlying drive once it's mounted; dismount with
mountvol /Pbefore ejecting.
Sources
References consulted while writing this article. Links open in a new tab.
- Microsoft Learn — mountvol command reference — Authoritative flag list and parameter semantics used to build the Essential options table.
- SS64 — mountvol — Cross-version comparison and historical syntax notes.
Real-world recipes
Mount a secondary volume under a data folder
@echo off
mkdir C:\Mounts\Backup 2>NUL
for /f %G in ('mountvol D: /L') do set GUID=%G
mountvol C:\Mounts\Backup %GUID%
echo Mounted D: at C:\Mounts\Backup
Output:
Mounted D: at C:\Mounts\Backup
List all volumes and their mount points
mountvol | findstr /V "Possible\|values\|VolumeName\|along\|^$"
Output:
\\?\Volume{a1b2c3d4-e5f6-7890-abcd-ef1234567890}\
C:\
\\?\Volume{f0e1d2c3-b4a5-6789-fedc-ba9876543210}\
D:\
\\?\Volume{01234567-89ab-cdef-0123-456789abcdef}\
*** NO MOUNT POINTS ***
Clean up stale mount point entries
mountvol /R
echo Stale mount point registry entries removed.
Output:
Stale mount point registry entries removed.
Bulk-mount data volumes by label
Rather than memorising drive letters, mount volumes by their NTFS labels into a known directory tree.
$mountRoot = 'C:\Mounts'
$pairs = @(
@{ Label = 'Archive'; Path = "$mountRoot\Archive" },
@{ Label = 'Media'; Path = "$mountRoot\Media" },
@{ Label = 'Scratch'; Path = "$mountRoot\Scratch" }
)
foreach ($pair in $pairs) {
$vol = Get-Volume -FileSystemLabel $pair.Label -ErrorAction SilentlyContinue
if (-not $vol) { Write-Warning "No volume with label '$($pair.Label)'"; continue }
New-Item -ItemType Directory -Path $pair.Path -Force | Out-Null
$part = Get-Partition | Where-Object { $_.AccessPaths -contains $vol.Path }
Add-PartitionAccessPath -DiskNumber $part.DiskNumber `
-PartitionNumber $part.PartitionNumber `
-AccessPath $pair.Path
Write-Host "Mounted $($pair.Label) at $($pair.Path)"
}
Output:
Mounted Archive at C:\Mounts\Archive
Mounted Media at C:\Mounts\Media
Mounted Scratch at C:\Mounts\Scratch
Audit script — every mount and its host
Walk the live mount map across a fleet and roll up CSV.
$report = foreach ($host in (Get-Content C:\Ops\hostlist.txt)) {
Invoke-Command -ComputerName $host -ErrorAction SilentlyContinue -ScriptBlock {
Get-Partition | Where-Object AccessPaths | ForEach-Object {
foreach ($ap in $_.AccessPaths) {
[PSCustomObject]@{
Host = $env:COMPUTERNAME
DiskNum = $_.DiskNumber
Partition = $_.PartitionNumber
SizeGB = [math]::Round($_.Size / 1GB, 1)
AccessPath = $ap
}
}
}
}
}
$report | Sort-Object Host, DiskNum | Format-Table -AutoSize
$report | Export-Csv C:\Ops\mountvol_audit.csv -NoTypeInformation
Output:
Host DiskNum Partition SizeGB AccessPath
---- ------- --------- ------ ----------
MYHOST 0 2 475.0 C:\
MYHOST 1 1 1862.4 D:\
MYHOST 1 1 1862.4 C:\Mounts\Archive\
SRV01 0 2 237.0 C:\
SRV01 1 1 931.5 C:\Mounts\Backup\
One-shot ESP inspection from WinRE
When troubleshooting an unbootable system from the Windows Recovery Environment, this is the canonical mount-and-look-around recipe.
diskpart /s mount_esp.txt
mountvol S: /S 2>NUL
dir S:\EFI /S
bcdedit /store S:\EFI\Microsoft\Boot\BCD /enum
mountvol S: /D
Output: (combined — see the directory listing and BCD store dump below)
Where mount_esp.txt contains:
list disk
select disk 0
list partition
exit
Output:
Directory of S:\EFI\Microsoft\Boot
01/01/2026 09:15 27,648 BCD
01/01/2026 09:15 65,536 BCD.LOG
...
Windows Boot Manager
--------------------
identifier {bootmgr}
device partition=\Device\HarddiskVolume1
description Windows Boot Manager
default {current}
displayorder {current}
timeout 30