Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ManagementScope and "root\cimv2"?

Tags:

c#

To create a ManagementScope object you have to pass a string to the constructor which is either an IP address or the name of a PC.

What I don't get is what the last part is for:

ManagementScope ms = new ManagementScope(@"FullComputerName\root\cimv2");
                                                            ^^^^^^^^^^
                                                               What is this?

What does root\cimv2 stand for? Where does it come from? and what else could there be instead of it?

like image 259
Kevin Avatar asked Jun 05 '11 14:06

Kevin


2 Answers

root is because it's the root of the tree. cimv2 is actually CIMv2, because it's version 2 of the CIM (Common Information Model).

like image 179
Roger Lipscombe Avatar answered Nov 15 '22 22:11

Roger Lipscombe


I think you're looking at this MSDN page. That input parameter is the full path, meaning the folders leading to the file.

That particular path is the default namespace for WMI classes.

like image 7
DOK Avatar answered Nov 15 '22 22:11

DOK