PowerShell Logo Small

Get-DiskImage



This is the built-in help made by Microsoft for the command 'Get-DiskImage', in PowerShell version 4 - as retrieved from Windows version 'Microsoft Windows 8.1 Enterprise' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Gets one or more disk image objects (virtual hard disk or ISO).

SYNTAX


Get-DiskImage [-ImagePath] <String[]> [-AsJob] [-CimSession <CimSession[]>] [-StorageType <StorageType>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Get-DiskImage [-AsJob] [-CimSession <CimSession[]>] [-StorageType <StorageType>] [-ThrottleLimit <Int32>] [-Volume <CimInstance>] [<CommonParameters>]
Get-DiskImage [-AsJob] [-CimSession <CimSession[]>] [-StorageType <StorageType>] [-ThrottleLimit <Int32>] -DevicePath <String[]> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Get-DiskImage cmdlet gets the objects associated with one or more disk images (virtual hard disk or ISO). This cmdlet requires either the full image path of the I
SO or VHD file, or the device path.


This cmdlet reports whether the specified ISO or VHD file is currently attached.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=294433
Dismount-DiskImage
Get-Disk
Get-Partition
Get-Volume
Mount-DiskImage

REMARKS

<

Examples


Example 1: Get a disk image by path

PS C:\>Get-DiskImage –ImagePath "E:\ISO-Files\My US Visit Fall 2010 Pictures.iso"



This example gets an ISO disk image specified by path and displays information about the disk image.




Example 2: Get a disk image by device path

PS C:\>Get-DiskImage -DevicePath \\.\CDROM1



This example gets an ISO disk image specified by device path and displays information about the disk image.




Example 3: Get the drive letter associated with a mounted ISO

PS C:\>Get-DiskImage -DevicePath \\.\CDROM1 | Get-Volume



This example displays the drive letter associated with an ISO file.




Example 4: Get the drive letter associated with a mounted VHD

PS C:\>Get-DiskImage –ImagePath E:\vhd1.vhdx | Get-Disk | Get-Partition | Get-Volume
DriveLetter FileSystemLabel FileSystem DriveType HealthStatus SizeRemaining Size
----------- --------------- ---------- --------- ------------ ------------- ----
F New Volume NTFS Fixed Healthy 19.27 GB 19.87 GB



This example displays one or more drive letters associated with volumes in a VHD file.