Skip to main content

How to List All Mount Points on a System in Batch Script

In Windows, a volume doesn't have to be assigned a drive letter. It can instead be mounted into an empty folder on another drive, creating a seamless path like C:\Data\Archive\ that actually points to a completely separate physical disk. This is common in server environments where you run out of drive letters or need to expand capacity transparently. When troubleshooting disk space issues or auditing storage topology, you need to know where these hidden mount points are, including system partitions that have no letter and no visible presence in File Explorer.

This guide will explain how to discover mount point mappings.

What Are Mount Points?

ConceptDescriptionExample
Drive LetterTraditional volume access via a letterD:\
Mount Point (Folder)Volume accessed through a folder on another driveC:\Data\Archive\ → separate disk
GUID PathInternal volume identifier used by the system\\?\Volume{abc12345-...}\
No MountVolume exists but has no letter or mount pathEFI System Partition, Recovery Partition
Mount Points vs. Network Drives

Mount points are local volumes mapped to folder paths. Network drive mappings (Z: → \\Server\Share) are completely different: they use the network, not local storage. Use mountvol for local mount points and net use for network mappings.

Method 1: Comprehensive Mount Point Report

This method shows every volume on the system, including those with drive letters, those mounted to folders, and those with no mount path at all (hidden system partitions).

Implementation

<# :
@echo off
setlocal
echo [INFO] Volume mount point inventory:
echo --------------------------------------------------

:: This line tells PowerShell to read this file and execute it as a script
powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((Get-Content '%~f0') -join \"`n\")"

echo --------------------------------------------------
endlocal
exit /b
#>

# --- Everything below this line is pure PowerShell ---

$volumes = Get-Volume -ErrorAction SilentlyContinue
if (-not $volumes) {
Write-Host 'Could not retrieve volume information.'
exit 1
}

Write-Host ''
Write-Host '--- Volumes with Drive Letters ---'
Write-Host ''
$lettered = $volumes | Where-Object { $_.DriveLetter }
if ($lettered) {
$lettered | ForEach-Object {
$sizeGB = [math]::Round($_.Size / 1GB, 1)
$freeGB = [math]::Round($_.SizeRemaining / 1GB, 1)
[PSCustomObject]@{
Mount = "$($_.DriveLetter):"
Label = if ($_.FileSystemLabel) { $_.FileSystemLabel } else { '(none)' }
FileSystem = [string]$_.FileSystemType
'Size GB' = $sizeGB
'Free GB' = $freeGB
Health = [string]$_.HealthStatus
}
} | Format-Table -AutoSize
} else {
Write-Host ' (none)'
}

Write-Host '--- Folder Mount Points ---'
Write-Host ''
$mountPoints = Get-CimInstance Win32_MountPoint -ErrorAction SilentlyContinue
$folderMounts = @()
if ($mountPoints) {
foreach ($mp in $mountPoints) {
$dir = $mp.Directory
if ($dir -and $dir.Name -match '\\[A-Z]:\\' -and $dir.Name -notmatch '^\\?\') {
$path = $dir.Name -replace '\\', '\'
$path = $path.Trim('"')
$volRef = $mp.Volume
$folderMounts += [PSCustomObject]@{
'Folder Path' = $path
'Volume' = $volRef.DeviceID -replace '\\', '\' -replace '"', ''
}
}
}
}

if ($folderMounts.Count -gt 0) {
$folderMounts | Format-Table -AutoSize
} else {
Write-Host ' No folder mount points configured.'
Write-Host ' All volumes are accessed via drive letters or have no mount path.'
}

Write-Host ''
Write-Host '--- Hidden Volumes (No Letter, No Mount Path) ---'
Write-Host ''
$hidden = $volumes | Where-Object { -not $_.DriveLetter -and $_.Size -gt 0 }
if ($hidden) {
$hidden | ForEach-Object {
$sizeMB = [math]::Round($_.Size / 1MB)
$sizeStr = if ($sizeMB -ge 1024) { '{0:N1} GB' -f ($_.Size / 1GB) } else { "$sizeMB MB" }
[PSCustomObject]@{
Label = if ($_.FileSystemLabel) { $_.FileSystemLabel } else { '(none)' }
FileSystem = [string]$_.FileSystemType
Size = $sizeStr
Type = if ($_.Size -lt 600MB -and $_.FileSystemType -eq 'FAT32') { 'EFI System' }
elseif ($_.FileSystemLabel -match 'Recovery') { 'Recovery' }
elseif ($_.Size -lt 20MB) { 'Reserved' }
else { 'Data/Unknown' }
Health = [string]$_.HealthStatus
}
} | Format-Table -AutoSize
} else {
Write-Host ' (none)'
}

Sample output:

--- Volumes with Drive Letters ---

Mount Label FileSystem Size GB Free GB Health
----- ----- ---------- ------- ------- ------
C: Windows NTFS 476.9 234.1 Healthy
D: Data NTFS 931.5 612.3 Healthy
E: BACKUP_USB exFAT 119.2 87.4 Healthy

--- Folder Mount Points ---

Folder Path Volume
----------- ------
C:\Data\Archive\ \\?\Volume{a1b2c3d4-...}\
C:\Data\Logs\ \\?\Volume{e5f6a7b8-...}\

--- Hidden Volumes (No Letter, No Mount Path) ---

Label FileSystem Size Type Health
----- ---------- ---- ---- ------
(none) FAT32 100 MB EFI System Healthy
Recovery NTFS 499 MB Recovery Healthy
(none) NTFS 16 MB Reserved Healthy

Why three sections:

  • Drive Letters: The most common access method, what users see in File Explorer.
  • Folder Mount Points: Volumes mounted into folders on other drives, invisible unless you know to look. These are the "hidden layer" that makes a folder on C: actually point to a different disk.
  • Hidden Volumes: System partitions with no access path, EFI System Partition, Recovery, Microsoft Reserved. These consume space but are not browsable. They are important for understanding the full storage layout.

Method 2: Quick mountvol Listing

For a fast text-based listing of all volume GUID paths and their mount points, the built-in mountvol command provides a raw but complete view.

@echo off
setlocal

echo [INFO] Volume GUID paths and mount points:
echo --------------------------------------------------
echo.

:: Show GUID volumes, drive letters, and hidden volumes
mountvol | findstr /R /C:"^\\\\\?\\Volume" /C:"^[A-Z]:\\" /C:"\*\*\*"

echo.
echo --------------------------------------------------
echo.
echo Reading the output:
echo Lines starting with a drive letter (e.g., C:\) are mount points.
echo Lines starting with \\?\Volume{...} are volume GUID paths.
echo *** - Volume has no mount point (hidden partition).
echo.
echo For a structured report, use Method 1 (PowerShell).

endlocal
exit /b 0

When mountvol is useful:

  • No PowerShell available: mountvol works on all Windows versions.
  • Recovery environments: Available in WinPE and recovery consoles.
  • Volume GUID paths: Shows the GUID path for each volume, which is needed for programmatic mount point operations.

mountvol operations:

CommandAction
mountvolList all volumes and their mount points
mountvol C:\Data\Archive\ \\?\Volume{GUID}\Mount a volume to a folder
mountvol C:\Data\Archive\ /DRemove a folder mount point
mountvol D: /PRemove a volume's drive letter

Method 3: Mount Point Space Analysis

For disk space troubleshooting, you need to know how much space each mounted volume has, especially when folder mount points make it look like one drive has more space than its physical size.

@echo off
setlocal

echo [INFO] Storage space by mount point:
echo --------------------------------------------------

powershell -NoProfile -Command ^
"$allMounts = @();" ^
"Get-Volume | Where-Object { $_.DriveLetter -and $_.Size -gt 0 } | ForEach-Object {" ^
" $totalGB = [math]::Round($_.Size / 1GB, 1);" ^
" $freeGB = [math]::Round($_.SizeRemaining / 1GB, 1);" ^
" $usedPct = [math]::Round((1 - $_.SizeRemaining / $_.Size) * 100);" ^
" $allMounts += [PSCustomObject]@{" ^
" 'Mount Point' = \"$($_.DriveLetter):\";" ^
" Label = if ($_.FileSystemLabel) { $_.FileSystemLabel } else { '-' };" ^
" 'Total GB' = $totalGB;" ^
" 'Free GB' = $freeGB;" ^
" 'Used %%' = $usedPct" ^
" }" ^
"};" ^
"$wmiMounts = Get-CimInstance Win32_Volume | Where-Object {" ^
" $_.Name -match '^[A-Z]:\\\\.*\\\\$' -and $_.Name -notmatch '^[A-Z]:\\\\$'" ^
"};" ^
"foreach ($m in $wmiMounts) {" ^
" $totalGB = [math]::Round($m.Capacity / 1GB, 1);" ^
" $freeGB = [math]::Round($m.FreeSpace / 1GB, 1);" ^
" $usedPct = if ($m.Capacity -gt 0) { [math]::Round((1 - $m.FreeSpace / $m.Capacity) * 100) } else { 0 };" ^
" $allMounts += [PSCustomObject]@{" ^
" 'Mount Point' = $m.Name;" ^
" Label = if ($m.Label) { $m.Label } else { '-' };" ^
" 'Total GB' = $totalGB;" ^
" 'Free GB' = $freeGB;" ^
" 'Used %%' = $usedPct" ^
" }" ^
"};" ^
"if ($allMounts) {" ^
" $allMounts | Sort-Object 'Mount Point' | Format-Table -AutoSize" ^
"} else {" ^
" Write-Host 'No mounted volumes found.'" ^
"}"

echo --------------------------------------------------

endlocal
exit /b 0

Sample output:

Mount Point Label Total GB Free GB Used %
----------- ----- -------- ------- ------
C:\ Windows 476.9 234.1 51
C:\Data\Archive\ OldBackups 931.5 45.3 95
C:\Data\Logs\ LogStorage 465.8 412.1 12
D:\ Data 931.5 612.3 34
E:\ BACKUP_USB 119.2 87.4 27

Why this matters for disk space troubleshooting:

When a user reports "C: is almost full," the actual problem might be a mount point on C:, like C:\Data\Archive\, that is a separate volume running out of space. Without mount point awareness, dir C:\ shows the folder exists but reports the space of the C: volume, not the mounted volume. This method shows each mount point with its own space, making it clear which physical volume is actually full.

Method 4: Fleet-Wide Mount Point Inventory

For auditing storage topology across multiple servers.

@echo off
setlocal

set "CSVFile=\\Server\Audit\mount_points.csv"

if not exist "%CSVFile%" (
echo "Timestamp","Computer","MountPoint","Label","FileSystem","TotalGB","FreeGB","UsedPct" > "%CSVFile%" 2>nul
)

powershell -NoProfile -Command ^
"$ts = Get-Date -Format 'yyyy-MM-dd HH:mm:ss';" ^
"Get-CimInstance Win32_Volume | Where-Object {" ^
" $_.Name -and $_.Capacity -gt 0 -and $_.FileSystem" ^
"} | ForEach-Object {" ^
" $totalGB = [math]::Round($_.Capacity / 1GB, 1);" ^
" $freeGB = [math]::Round($_.FreeSpace / 1GB, 1);" ^
" $usedPct = [math]::Round((1 - $_.FreeSpace / $_.Capacity) * 100);" ^
" $label = if ($_.Label) { $_.Label } else { 'none' };" ^
" $mount = $_.Name -replace '\\\\$', '';" ^
" Write-Output ('\"' + $ts + '\",\"' + $env:COMPUTERNAME + '\",\"' + $mount + '\",\"' + $label + '\",\"' + $_.FileSystem + '\",\"' + $totalGB + '\",\"' + $freeGB + '\",\"' + $usedPct + '\"')" ^
"}" >> "%CSVFile%" 2>nul

echo [OK] Mount point data exported for %COMPUTERNAME%.

endlocal
exit /b 0

What to look for in the fleet CSV:

  • Mount points with high UsedPct: May need expansion or cleanup, especially log volumes.
  • Servers with many mount points: Complex topology that should be documented for disaster recovery.
  • Inconsistent mount layouts across similar servers: May indicate non-standardized provisioning.
  • Mount points that appeared or disappeared between scans: Volumes were added or removed without change management.

How to Avoid Common Errors

Wrong Way: Assuming All Storage Has a Drive Letter

Hidden system partitions (EFI, Recovery, Reserved) and folder-mounted volumes have no drive letter. Auditing only drive letters misses significant portions of the storage topology.

Correct Way: Method 1 shows all three categories: lettered volumes, folder mount points, and hidden partitions.

Problem: Mount Point Hides Existing Files

If you mount a volume to a folder that already contains files (e.g., C:\Data\ already has files in it), the original files are hidden, not deleted, but inaccessible, until the volume is unmounted.

Solution: Always mount to an empty folder. Before creating a mount point, verify the target folder is empty:

dir "C:\Data\Archive\" /a /b 2>nul
if not errorlevel 1 echo WARNING: Folder is not empty!

Problem: dir Reports Wrong Free Space for Mount Points

When you run dir C:\Data\Archive\, the "bytes free" line shows the free space of the mounted volume, not the C: drive. This can be confusing: it appears that C: has a different amount of free space depending on which subdirectory you check.

Solution: Understand that each mount point has its own independent space. Method 3 shows the space for each mount point explicitly.

Problem: Backup Software and Mount Points

Some backup tools follow mount points and back up the mounted volume's contents as if they were part of the parent drive. Others skip mount points entirely. This can result in either duplicate backups or missed data.

Solution: Check your backup software's documentation for mount point handling. Windows Server Backup, for example, has an option to include or exclude mounted volumes.

Finding What's Mounted Where

If you know a volume's GUID path (from mountvol output) and need to find or change its mount point, use:

:: Mount a volume to a folder
mountvol C:\Data\NewMount\ \\?\Volume{guid-here}\

:: Remove a folder mount point (volume remains, just the path is removed)
mountvol C:\Data\NewMount\ /D

The folder must exist and be empty before mounting.

Best Practices and Rules

1. Document Your Mount Topology

On servers with folder mount points, maintain a diagram showing which physical disks are mounted where. This is essential for disaster recovery: if the server needs to be rebuilt, the mount points must be recreated in the correct order.

2. Mount to Empty Folders Only

Mounting to a folder with existing files hides those files. Always create a dedicated empty folder for each mount point.

3. Include Mount Points in Disk Space Monitoring

Standard disk space monitoring scripts that only check drive letters will miss folder-mounted volumes. Use Win32_Volume or Get-Volume to capture all mounted volumes regardless of their access method.

4. Check Backup Coverage

Verify that your backup solution handles mount points correctly, either including them explicitly or warning that they are excluded. Missing a mounted volume from backups can mean losing an entire dataset.

5. Use Mount Points When Drive Letters Run Out

Windows supports 26 drive letters (A–Z). Servers with many volumes can exhaust this limit. Mount points provide unlimited additional mount paths without consuming letters.

Conclusions

Listing all mount points provides the complete picture of your system's storage topology, including folder-mounted volumes that are invisible in File Explorer's drive list and hidden system partitions that consume space without any visible mount path. By auditing all three access methods (drive letters, folder mounts, and hidden volumes), tracking the space usage of each independently, and maintaining documentation of the topology, you can manage complex server storage with confidence and prevent the "phantom disk space" confusion that mount points can create.