Find the operating system version of a remote windows 10 machine
To find the operating system version of a remote Windows 10 machine, you can use PowerShell.
Use this script to accomplish this:
$computerName = "RemoteComputerName"
$osInfo = Get-WmiObject -Class Win32_OperatingSystem -ComputerName $computerName
Write-Output "Computer Name: $computerName"
Write-Output "OS Name: $($osInfo.Caption)"
Write-Output "OS Version: $($osInfo.Version)"
Write-Output "OS Build: $($osInfo.BuildNumber)"
# Get Windows 10 specific version (e.g. 1909, 2004, etc.)
$win10Version = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ReleaseId -ErrorAction SilentlyContinue).ReleaseId
if ($win10Version) {
Write-Output "Windows 10 Version: $win10Version"
}
- Replace “RemoteComputerName” with the hostname or IP address of the remote computer you want to query.
- Ensure you have the necessary permissions to query WMI on the remote machine.
- Run the script in PowerShell.
This script will provide:
- Computer Name
- OS Name (e.g. “Microsoft Windows 10 Pro”)
- OS Version (e.g. “10.0.19041”)
- OS Build number
- Windows 10 specific version (e.g. 1909, 2004, etc.) if available
e.g.
Computer Name: CRACKEN001
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.19044
OS Build: 19044
Windows 10 Version: 2009
If you need to run this for multiple computers, you can modify the script to accept computer names from a file or as parameters.
Note:
The Windows 10 specific version (like 1909, 2004) might not be available on all systems, specifically if they’re not up to date.
In such cases, you might need to use the build number to determine the exact version.
Hope you will find this helpful.