Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Identify Letter of Mounted ISO or VHD File with PowerShell

$
0
0

Summary: Use Windows PowerShell to identify the letter of a mounted ISO or VHD file in Windows Server 2012 R2 or Windows 8.1.

Hey, Scripting Guy! Question I know I can mount ISOs and VHD files in Windows 8.1, but is there a way to programmatically know what
          the drive letter is without checking the GUI and playing with DiskPart?

Hey, Scripting Guy! Answer Pipe the output of Get-DiskImage to Get-Volume or Get-Disk and Get-Partition:

For an ISO file:

GET-DISKIMAGE filename.iso | GET-VOLUME

For a VHD file:

GET-DISKIMAGE filename.vhd | GET-DISK | GET-PARTITION


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>