elegant way to mount multiple disk images

I have a folder with over 100 dvd .iso disk image files. I would like to mount them all

I can mount them 15 at a time natively to separate drive letters in windows 10 pro, but this is a lot of drive letters and tedious using file explorer. Is there a better more elegant way to do what I want?

I prefer not to have any duplicate data and I prefer to keep the original .iso file formatted files as they are, so, I don't want to extract all the iso files to a folder or create some sort of mega iso file.

I was using an external drive, but that drive will be used only for a backup.

I learned that I can use powershell to invoke-item *.iso for that directory, but it opens an explorer window for each image and I would prefer that not to happen. Mount-diskimage can only do one .iso file at a time.

2

1 Answer

The 'Elegant' way is to use Mount-DiskImage and not specify a drive letter:

# Find all the ISO files in the current folder, mount them, and save as $mounts:
$mounts = Get-ChildItem *.iso | ForEach { Mount-DiskImage $_ -StorageType ISO -NoDriveLetter -PassThru | Get-Volume
}
# Example: List the contents of all mounted disks (you must use literal paths):
$mounts | ForEach { Get-ChildItem -LiteralPath $_.Path }
# Unmount all of the ISO files when you're done:
$mounts | ForEach { Get-DiskImage -Volume $_ | Dismount-DiskImage }

If you specify a drive letter, you're limited to 23 mounts at a time as letters A-C are reserved.

These mounts can be accessed via volume guid:

$mounts.Path
\\?\Volume{b1d42111-e389-11e9-9784-bc838509800c}\
\\?\Volume{b1d421a4-e389-11e9-9784-bc838509800c}\
Get-ChildItem '\\?\Volume{b1d42111-e389-11e9-9784-bc838509800c}\ '
cd '\\?\Volume{b1d421a4-e389-11e9-9784-bc838509800c}\myfolder\'

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like