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 SystemPS C:\> (Get-WmiObject Win32_OperatingSystem).NameIs Operating System 32-bit or 64-bitPS C:\> (Get-WmiObject Win32_OperatingSystem).OSArchitectureName of the Machine PS C:\> (Get-WmiObject Win32_OperatingSystem).CSNameThere are many more properties of the Operating System that are exposed. To obtain more details, run the followingPS C:\> Get-WmiObject Win32_OperatingSystem | Get-Member * Tested using PowerShell 2.0
Read more: Kotesh Bandhamravuri
  
Read more: Kotesh Bandhamravuri