PowerShell – How to find details of Operating System

There were several instances where I had to find details of the operating system using PowerShell. Here, I am providing several PowerShell snippets that return various details of the Operating System.

Name of the Operating System

(Get-WmiObject Win32_OperatingSystem).Name

Is Operating System 32-bit or 64-bit

(Get-WmiObject Win32_OperatingSystem).OSArchitecture

Name of the Machine

(Get-WmiObject Win32_OperatingSystem).CSName

There are many more properties of the Operating System that are exposed. To obtain more details, run the following

Get-WmiObject Win32_OperatingSystem | Get-Member

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.