Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Thursday, November 22, 2018 4:30 PM
Hi,
I would like to fetch Windows 10 build number remotely from all clients in my network.
When i try to pass "ver" command, it only returns first three octet like 10.0.15063 whereas i am interested in knowing complete build number of the system which also include release version in the fourth octet which gets increased with every cumulative update like for march 2018 CU for 1703 it must return "10.0.15063.994" whereas i am only getting 10.0.15063
Apart from trying ver, command I also tried below things to get the full version number OR the fourth octet
- checking in registry for such info, but i could only get either 15063 or 1703
- using systeminfo with findstr command for OS info which also lacks release number and only returns Windows 10 15063
- Have tried wmic query as well which also did not return the piece of information I am interested in..
would like to further assistance to obtain this info.
Note: interesting fact is that when i run "ver" on 1709 windows 10 build i get complete build number with release number for example "Microsoft Windows [Version 10.0.16299.726]"
All replies (4)
Thursday, November 22, 2018 6:33 PM
Hi MS-WinTechie.
The full information about the Windows 10 version is stored in the Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion key of the Registry.
You could try querying that key or using the following PowerShell snippet
[System.Environment]::OSVersion.Version
Bye.
Luigi Bruno
MCP, MOS, MTA, MCTS, MCSA, MCSE
Thursday, November 22, 2018 7:16 PM
1st solution using remote registries only:
$remotePC = $env:COMPUTERNAME
$Reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $remotePC)
$RegKey= $Reg.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion")
$majorVersionNr = $RegKey.GetValue("CurrentMajorVersionNumber")
$minorVersionNr = $RegKey.GetValue("CurrentMinorVersionNumber")
$buildNr = $RegKey.GetValue("CurrentBuild")
$buildExt = $RegKey.GetValue("UBR")
$version = "$($majorVersionNr).$($minorVersionNr).$($buildNr).$($buildExt)"
Write-Host $version
2nd solution using remote WMI and remote registry:
$remotePC = $env:COMPUTERNAME
$Reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $remotePC)
$RegKey= $Reg.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion")
$buildExt = $RegKey.GetValue("UBR")
$version = "$((Get-WmiObject -ComputerName $remotePC -Query "SELECT Version FROM Win32_OperatingSystem").Version).$buildExt"
Write-Host $version
Friday, November 23, 2018 9:44 AM
Thanks.. This is what i was looking for the UBR registry key which keeps release number, which i have been ignoring previously.
Thanks again
Friday, November 23, 2018 10:12 AM
Hi,
Thanks for posting here.
1.we can also run winver to check build number.
2. As to the fetch the build number remotely, we can refer to this article:
Best regards,
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].