Is it possible to make a command return several attributes and then assign each attribute to a variable?
gwmi -computer $compname Win32_ComputerSystem | ForEach {$_.Name,$_.Domain,$_.Manufacturer,$_.Model,$_.SystemType}
This code returns Name, domain.. as you can see. is it possible to save for example:
$_.Name to a variable $Name?
If you need a variable for each try this: