Get-CimInstance Win32_BaseBoard | Select-Object Manufacturer, Product
Get-WmiObject Win32_BaseBoard | Select-Object Manufacturer, Product
Use wmic:
wmic baseboard get product, manufacturer
Showing posts with label CIM. Show all posts
Showing posts with label CIM. Show all posts
09 February 2015
Motherboard model and manufacturer
06 January 2015
CIM cmdlets in powershell v3
In powershell v3 WMI cmdlets are replaced by CIM cmdlet which are used a little bit different then WMI cmdlets.
On example is the method invocation which cannot be done by referencing the object that contain the WMI data:
$wmi_object.method_name
CIM objects don't have all the relevant and useful methods that WMI objects have.
To discover methods that can be used for a specific class name we use:
Get-CimClass -ClassName Win32_Process | Select-Object -ExpandProperty CimClassMethods
after discovering the methods available we can invoke a method by using the Invoke-CimMethod cmdlet:
$CIMProcess | Invoke-CimMethod -MethodName Terminate
On example is the method invocation which cannot be done by referencing the object that contain the WMI data:
$wmi_object.method_name
CIM objects don't have all the relevant and useful methods that WMI objects have.
To discover methods that can be used for a specific class name we use:
Get-CimClass -ClassName Win32_Process | Select-Object -ExpandProperty CimClassMethods
after discovering the methods available we can invoke a method by using the Invoke-CimMethod cmdlet:
$CIMProcess | Invoke-CimMethod -MethodName Terminate
Subscribe to:
Posts (Atom)