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!
Technology Tips and News
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!
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.