Dismount a disk image (virtual hard disk or ISO) so that it can no longer be accessed as a disk.
Syntax
Dismount-DiskImage { [-ImagePath] String[] | -DevicePath String[] }
[-StorageType StorageType] [-CimSession CimSession[]] [-ThrottleLimit Int32]
[-AsJob] [-WhatIf] [-Confirm] [CommonParameters]
Dismount-DiskImage -InputObject CimInstance[]
[-CimSession CimSession[]] [-ThrottleLimit Int32]
[-AsJob] [-WhatIf] [-Confirm] [CommonParameters]
Key
-AsJob
Run the cmdlet as a background job.
Use this parameter to run commands that take a long time to complete.
-CimSession
Run 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.
-Confirm
Prompt for confirmation before running the cmdlet.
-DevicePath
The device path of the ISO or VHD file. You cannot use this parameter with the -ImagePath parameter.
-ImagePath
The path of the ISO or VHD file. You cannot use this parameter with the -DevicePath parameter.
-InputObject
The input object that is used in a pipeline command.
-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.
-ThrottleLimit
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 PowerShell 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.
-WhatIf
Describe the command without actually executing it.
-Volume
Get the disk image associated with the specified Volume object.
Enter a Volume CIM object, which can be obtained by using the Get-Volume cmdlet.
The Dismount-DiskImage cmdlet dismounts a disk image (virtual hard disk or ISO) so that it can no longer be accessed as a disk. This cmdlet requires either the full image path of the ISO or VHD file, or the device path. To eject a VHD file, administrator privilege is required.
On Windows Server 2012+, only an administrator is allowed to mount or eject an ISO file.
Standard Aliases for Dismount-DiskImage: none
Dismount a disk image by path:
PS C:\> Dismount-DiskImage -ImagePath "E:\ISO-Files\demo.iso"
Dismount a disk image by device path:
PS C:\> Dismount-DiskImage -DevicePath \\.\CDROM1
“I'm proud of myself for the way I pushed through and even learned that dismount that I haven't done in years” ~ Simone Biles
Mount-DiskImage - Mount a previously created disk image (virtual HD or ISO).
Get-DiskImage - Get one or more disk image objects (virtual hard disk or ISO).
Windows: MOUNTVOL - Create, delete or list a volume mount point.