How to Get Windows OS Version using PowerShell

How to Get Windows OS Version using PowerShell

In this tutorial, you will learn how to use Windows PowerShell commands to determine the OS version of your Windows system.

Method 1 - Using the WMI Object

PowerShell has a Get-WmiObject cmdlet that allows you to fetch information about the Windows Management Instrumentation (WMI) classes. We can use this cmdlet to query the information and then pipe the resulting output to the select command. This will enable us to fetch the OS version as shown in the command below:

Get-WMIObject win32_operatingsystem | Select Version
Great! Next, complete checkout for full access to Cloudenv.
Welcome back! You've successfully signed in.
You've successfully subscribed to Cloudenv.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.