Reputation: 155
We will get the OS Build number every time we build an OS. However I cant find where is the OS Build number inside the windows ISO file. I tried to search from the install.wim but cannot find it. I might miss something. Please let me know where can i get that number.
Example of OS Build number : 18362.239
Upvotes: 1
Views: 8692
Reputation: 5359
An ISO file typically comes with several Windows images.
To get the build of, say, the first image of an ISO mounted on D:
(images list is 1-indexed):
(get-windowsimage -imagepath "D:\sources\install.wim" -index 1).build
Upvotes: 0
Reputation: 218
Why not use DISM?
dism /Get-WimInfo /WimFile:X:\sources\install.wim
Then if you look at the created date (e.g. If the created date is: 3/19/2017 then the build number is the "1703" = Year & Month of Windows 10 release) or look at the build number
Upvotes: 0
Reputation: 2676
So what you have there is [OS build number].[Updated Build Revision (UBR) number]
. You can get UBR by querying registry. That is the only way i know of.
(Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name UBR).UBR
To get the OS build, you can use the WMI class or registry method.
(get-wmiobject -Class win32_OperatingSystem).BuildNumber
or
(Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name CurrentBuild).CurrentBuild
or
[system.environment]::osversion.version.build
Or from the sysinfo which would be messy.
Now its just a matter of marrying the 2.
Upvotes: 2