In this article, we’ll show how to use DISM and PowerShell to find out which Windows images (versions, editions, builds, language pack) are stored in ISO or WIM files. If an ISO file name doesn’t contain a version and a build, it is hard to know which version of Windows is inside. Then it will be easier to mount the ISO file with a Windows installation image and get this information from the install.wim
file.
Right-click the ISO image and select Mount.
You will see a window with the contents of the virtual disk a Windows ISO image is mounted to. Open the Sources directory and find an installation file with a Windows image. The file is called install and may have one of the following extensions:
install.wim
install.esd
install.swm
Press and hold SHIFT, right-click install.xxx and copy the path to the file by selecting Copy as path.
Start the command prompt as administrator and run the following command (use the path from the clipboard as a file path):
DISM /Get-WimInfo /WimFile:"D:\sources\install.esd"
You will see a list of editions (Education, Home, Enterprise, Pro, etc.) available in this Windows ISO image. In our example, you can install 8 different Windows editions from this image. Each edition has an index you can use to get detailed information about the image.
To get information about the Windows version (build) and available languages in the WIM/ESD file in the image with the index 6
, run the command below:
DISM /Get-WimInfo /WimFile:"D:\sources\install.esd" /index:6
In our example, we have found out that it is Windows 10 2004 Professional (Version: 10.0.19041) with an English (en-US) language pack available in the installation image under index 6.
You can also get all information about Windows versions and editions in an ISO file using a simple PowerShell script.
Specify a path to the ISO file:
$imagePath = "C:\iso\WindowsServer_RTM.iso"
Mount the ISO image:
$Report = @()
$beforeMount = (Get-Volume).DriveLetter
$mountResult = Mount-DiskImage $imagePath -PassThru
$afterMount = (Get-Volume).DriveLetter
$ImageDrive= "$(($afterMount -join '').replace(($beforeMount -join ''), '')):"
You will get a drive letter where the image is mounted (the drive letter is assigned automatically, if not, check how to fix it here).
Then get the information about Windows versions in install.wim or install.esd:
$WinImages = Get-windowsimage -ImagePath "$ImageDrive\sources\install.wim”
Foreach ($WinImage in $WinImages)
{
$curImage=Get-WindowsImage -ImagePath "$ImageDrive\sources\install.wim” -Index $WinImage.ImageIndex
$objImage = [PSCustomObject]@{
ImageIndex = $curImage.ImageIndex
ImageName = $curImage.ImageName
Version = $curImage.Version
Languages=$curImage.Languages
Architecture =$curImage.Architecture
}
$Report += $objImage
}
Unmount the ISO image:
Dismount-DiskImage $mountResult.ImagePath
You can display the result in the Out-GridView table:
$Report | Out-GridView
As a result, we got a handy list of Windows images in the ISO file and their versions. In our example, Windows Server 2022 Evaluation was in the ISO.
1 comment
The above example for /index:6 should be /Index:6 with a capital I.