Get Operating System Information

I use the below to obtain information from the win32_operatingsystem wmi class.

In this example, we retrieve the date the operating system was installed.

Get-WmiObject -class Win32_OperatingSystem | Select-Object __SERVER,@{label='InstallDate';expression={$_.ConvertToDateTime($_.InstallDate)}}

To obtain different information, just change the InstallDate to the appropriate column.

Tip: Add the -computer <computername> parameter after Win32_OperatingSystem to get information from a remote system.

Leave a Reply