none
Powershell script that will place the Wmi computersysten model property into a variable RRS feed

  • Question

  • Hi,

    Tried  to script with Get-WmiObject -Class Win32_ComputerSystem -Property model. I want to write the model into a Variable and haven't had much luck?

    Thanks!

    Tuesday, August 25, 2015 6:05 PM

All replies

  • This should work.

    $variable = (Get-WmiObject -Class Win32_ComputerSystem -Property model).Model

    You included the Model property but other default properties are also returned. You need to single out the Model property.

    Tuesday, August 25, 2015 7:43 PM