Mount an ISO as a Virtual Drive with Mount-DiskImage
Mount ISO (and VHD) files as virtual drives with PowerShell and get the new drive letter back — no third-party mounting tools.
01Command
$ Mount-DiskImage -ImagePath "D:\ISOs\Win11.iso" -PassThru | Get-Volume | Select-Object DriveLetter02What it does
Windows has mounted ISO images natively since Windows 8, and Mount-DiskImage is its command-line form — the ISO appears as a new DVD/virtual drive you can browse, copy from, or run installers from. The -PassThru part is a quality-of-life addition: without it the command is silent, with it the output pipes into Get-Volume so you immediately see the assigned drive letter. To eject, run Dismount-DiskImage with the same -ImagePath (double-clicking the mounted drive's Eject works too).
03Risk
04Undo
$ Dismount-DiskImage -ImagePath "D:\ISOs\Win11.iso"05Sources
- Mount-DiskImageEvidence: Mount-DiskImage mounts ISO and VHD files as virtual drives; -PassThru returns the image object for follow-up queries, and Dismount-DiskImage unmounts.
Last verified: 2026-09-18 · Category: Files & Folders
06Related solutions
Search inside text files and logs with regex, returning file, line number and match.
Create or update a .zip from any files or folder contents straight from PowerShell.
A built-in PowerShell one-liner that answers 'is port 5432/3389/443 actually open through this network?' — no telnet client needed.