NAME
Get-DiskImage
SYNOPSIS
Gets one or more disk image objects (virtual hard disk or ISO).SYNTAX
Get-DiskImage [-ImagePath]
[-CimSession ] [-StorageType {Unknown | ISO | VHD | VHDX | VHDSet}] [-ThrottleLimit
] [ ] Get-DiskImage [-CimSession
] [-StorageType {Unknown | ISO | VHD | VHDX | VHDSet}] [-ThrottleLimit
] -DevicePath [ ] Get-DiskImage [-CimSession
] [-StorageType {Unknown | ISO | VHD | VHDX | VHDSet}] [-ThrottleLimit
] [-Volume ] [ ] 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 ISO or VHD file, or the device path. This cmdlet reports whether the specified ISO or VHD file is currently attached.PARAMETERS
-CimSession [
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such] as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local
computer. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false-DevicePath
Specifies the device path of the ISO or VHD file. You cannot use this parameter with the ImagePath parameter. Required? true Position? named Default value noneAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-ImagePath
Specifies the path of the ISO or VHD file. You cannot use this parameter with the DevicePath parameter. Required? true Position? 1 Default value noneAccept pipeline input? True (ByValue, ByPropertyName)
Accept wildcard characters? false-StorageType [
Specifies the type of a disk image: ISO, VHD, VHDx, or Unknown. If the StorageType parameter is not specified or the Unknown type is provided, the storage type is determined by file extension. Required? false Position? named Default value none] Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-ThrottleLimit [
Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShellr calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false] -Volume [
Gets the disk image associated with the specified Volume object. Enter a Volume CIM object, which can be] obtained by using the Get-Volume cmdlet.
Required? false Position? named Default value none Accept pipeline input? True (ByValue) Accept wildcard characters? falseThis cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216). INPUTS
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Volume http://msdn.microsoft.com/library/windows/desktop/hh830604.aspx You can pipe a Volume object to the Volume parameter.OUTPUTS
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_DiskImage http://msdn.microsoft.com/library/windows/desktop/hh830494.aspx This cmdlet returns an object that represents the specified disk image.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.RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkId=812916Dismount-DiskImage
Get-Disk
Get-Partition
Get-Volume
Mount-DiskImage