November 9th, 2014

PowerTip: Use PowerShell to Find Windows Version

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to find what version of Windows you are running.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find the version of Windows that is installed on a group of computers?
           To be safe, I need the command to be compatible with Windows PowerShell  2.0.

Hey, Scripting Guy! Answer Use the Get-WmiObject cmdlet and query the Win32_OperatingSystem WMI class:

(Get-WmiObject win32_operatingsystem).version

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.