Classes, Properties and Instances
Classes and Instances
Classes are the basic management units. Each class is a model (a pattern) for an object type.
The instances of a class are the actual objects present in this class.
Example:
The class Win32_LogicalDisk is a model for each drive that can exist on Windows computers. The
instances of this class are the
physical and logical (connected) drives:
Properties and Methods
Properties describe the individual instances of a class. Each class has one or more properties. Each property is of a particular type, such as String, Integer or DateTime. One or more properties can be keys or key properties of the class that can be used to identify each instance of this class.
Example:
The Win32_LogicalDisk
class also has the following properties:
- "Caption" – the name of the drive
- "Size" – the free disk space on the drive
Methods are interfaces that the classes can use to execute actions. The methods are addressed using WMI. A class can have no, one or more methods. Ivanti DSMcurrently only supports the export of properties, but not the execution of methods.
Example:
The Win32_NetworkAdapterConfiguration
class describes the properties and methods of network adapters. If a computer
has two network cards there are two instances in this class. The properties
are assigned the values that correspond to the network card configuration:
Properties | Network card 1 (instance 1) | Network card 2 (instance 2) |
---|---|---|
IPAddress |
192.100.50.30 |
192.200.30.10 |
DNSDomainSuffix-SearchOrder |
es.heatsoftware.com |
muc.heatsoftware.com |