In Powershell I run a get-wmiobject on Win32_OperatingSystem, and it returns several properties through the select-object cmdlet. How to I get the values loaded to variables instead of a list,since I need to further process them? I tried several methods without avail. If I can get this accomplished without the select-object cmdlet, that would also work.
get-wmiobject -namespace root\CIMV2 -class Win32_OperatingSystem -computername $servername | Select-Object SystemDirectory,caption,BuildNumber