• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

TECHDIIP

  • Tech
  • Windows
  • Powershell
  • Scripts
  • News
  • Games

How to get Windows version

How to Find Windows Version on any computer machine and it is required to upgrade when your computer has an old version update, here are the simple steps on how to find windows version.

When you are supporting a large scale environment that has a mixed set of computers like servers and desktop machines with different operating systems and want to pull a report for windows version, then there are two ways we can pull the information as below.

Find Windows Version Using WMI

gwmi win32_operatingsystem | % caption
#output
PS C:\Windows\System32> gwmi win32_operatingsystem | % caption 
Microsoft Windows 10 Enterprise

Multiple Remote Computers

We need to create a file for storing all the servers or multiple machines list, I named itas Allservers.txt for and saved it in my local machine c:\temp\Allservers.txt

$Allserers = get-content -path "C:\temp\Allservers.txt"
foreach ($oneserver in $allservers)
{
Write-host "currenty the Script is Running on"$oneserver
Get-WmiObject -ComputerName $oneserver win32_operatingsystem | % caption 
}

Find Windows Version Using Registry

Sometimes the result using WMI is a bit slow, we can also get the Windows version using registry, here is the simple Powershell code.

$Version = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\'
$Version
$Version.ProductName
$Version.CurrentMajorVersionNumber

Thank you for reading this article, if you have any questions please let us know.

Thank you for visiting my site, for any scripts in these articles you are testing please make sure you have tested this script in our lower environment before you run in production.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Recent Posts

  • How do Zoom Application Testing | Working or Not
  • Powershell script to test website status up or down on a local or remote computers
  • Solved: Server execution failed windows 10 Server 2016 and 2019
  • How to Fix windows 10 version 1903 error 0xc1900223
  • Free Music Making Software List One Can Try Out
  • About Us
  • CONTACT US
  • Disclaimer
  • Privacy Policy

Copyright © 2023 techdiip.com