DeviceId - property in ROOT\CIMV2\ms_409 namespace

DeviceId in other namespaces

List of classes with DeviceId local property in ROOT\CIMV2\ms_409 namespace

propertyClassOrigin
DeviceIdCIM_DeviceErrorCountsCIM_DeviceErrorCounts
DeviceIdCIM_LogicalDeviceCIM_LogicalDevice
DeviceIdCIM_StorageErrorCIM_StorageError
DeviceIdWin32_PnPSignedDriverWin32_PnPSignedDriver

List of classes with DeviceId derived property in ROOT\CIMV2\ms_409 namespace

propertyClassOrigin
DeviceIdCIM_AggregatePExtentCIM_LogicalDevice
DeviceIdCIM_AggregatePSExtentCIM_LogicalDevice
DeviceIdCIM_AlarmDeviceCIM_LogicalDevice
DeviceIdCIM_BatteryCIM_LogicalDevice
DeviceIdCIM_BinarySensorCIM_LogicalDevice
DeviceIdCIM_CacheMemoryCIM_LogicalDevice
DeviceIdCIM_CDROMDriveCIM_LogicalDevice
DeviceIdCIM_ControllerCIM_LogicalDevice
DeviceIdCIM_CoolingDeviceCIM_LogicalDevice
DeviceIdCIM_CurrentSensorCIM_LogicalDevice
DeviceIdCIM_DesktopMonitorCIM_LogicalDevice
DeviceIdCIM_DiscreteSensorCIM_LogicalDevice
DeviceIdCIM_DiskDriveCIM_LogicalDevice
DeviceIdCIM_DisketteDriveCIM_LogicalDevice
DeviceIdCIM_DiskPartitionCIM_LogicalDevice
DeviceIdCIM_DisplayCIM_LogicalDevice
DeviceIdCIM_FanCIM_LogicalDevice
DeviceIdCIM_FlatPanelCIM_LogicalDevice
DeviceIdCIM_HeatPipeCIM_LogicalDevice
DeviceIdCIM_InfraredControllerCIM_LogicalDevice
DeviceIdCIM_KeyboardCIM_LogicalDevice
DeviceIdCIM_LogicalDiskCIM_LogicalDevice
DeviceIdCIM_MagnetoOpticalDriveCIM_LogicalDevice
DeviceIdCIM_ManagementControllerCIM_LogicalDevice
DeviceIdCIM_MediaAccessDeviceCIM_LogicalDevice
DeviceIdCIM_MemoryCIM_LogicalDevice
DeviceIdCIM_MultiStateSensorCIM_LogicalDevice
DeviceIdCIM_NetworkAdapterCIM_LogicalDevice
DeviceIdCIM_NonVolatileStorageCIM_LogicalDevice
DeviceIdCIM_NumericSensorCIM_LogicalDevice
DeviceIdCIM_ParallelControllerCIM_LogicalDevice
DeviceIdCIM_PCIControllerCIM_LogicalDevice
DeviceIdCIM_PCMCIAControllerCIM_LogicalDevice
DeviceIdCIM_PCVideoControllerCIM_LogicalDevice
DeviceIdCIM_PhysicalExtentCIM_LogicalDevice
DeviceIdCIM_PointingDeviceCIM_LogicalDevice
DeviceIdCIM_PotsModemCIM_LogicalDevice
DeviceIdCIM_PowerSupplyCIM_LogicalDevice
DeviceIdCIM_PrinterCIM_LogicalDevice
DeviceIdCIM_ProcessorCIM_LogicalDevice
DeviceIdCIM_ProtectedSpaceExtentCIM_LogicalDevice
DeviceIdCIM_RefrigerationCIM_LogicalDevice
DeviceIdCIM_ScannerCIM_LogicalDevice
DeviceIdCIM_SCSIControllerCIM_LogicalDevice
DeviceIdCIM_SensorCIM_LogicalDevice
DeviceIdCIM_SerialControllerCIM_LogicalDevice
DeviceIdCIM_StorageExtentCIM_LogicalDevice
DeviceIdCIM_StorageVolumeCIM_LogicalDevice
DeviceIdCIM_TachometerCIM_LogicalDevice
DeviceIdCIM_TapeDriveCIM_LogicalDevice
DeviceIdCIM_TemperatureSensorCIM_LogicalDevice
DeviceIdCIM_UninterruptiblePowerSupplyCIM_LogicalDevice
DeviceIdCIM_USBControllerCIM_LogicalDevice
DeviceIdCIM_USBDeviceCIM_LogicalDevice
DeviceIdCIM_USBHubCIM_LogicalDevice
DeviceIdCIM_UserDeviceCIM_LogicalDevice
DeviceIdCIM_VideoControllerCIM_LogicalDevice
DeviceIdCIM_VolatileStorageCIM_LogicalDevice
DeviceIdCIM_VoltageSensorCIM_LogicalDevice
DeviceIdCIM_VolumeSetCIM_LogicalDevice
DeviceIdCIM_WORMDriveCIM_LogicalDevice
DeviceIdWin32_1394ControllerCIM_LogicalDevice
DeviceIdWin32_BatteryCIM_LogicalDevice
DeviceIdWin32_BusCIM_LogicalDevice
DeviceIdWin32_CacheMemoryCIM_LogicalDevice
DeviceIdWin32_CDROMDriveCIM_LogicalDevice
DeviceIdWin32_CurrentProbeCIM_LogicalDevice
DeviceIdWin32_DesktopMonitorCIM_LogicalDevice
DeviceIdWin32_DiskDriveCIM_LogicalDevice
DeviceIdWin32_DiskPartitionCIM_LogicalDevice
DeviceIdWin32_FanCIM_LogicalDevice
DeviceIdWin32_FloppyControllerCIM_LogicalDevice
DeviceIdWin32_FloppyDriveCIM_LogicalDevice
DeviceIdWin32_HeatPipeCIM_LogicalDevice
DeviceIdWin32_IDEControllerCIM_LogicalDevice
DeviceIdWin32_InfraredDeviceCIM_LogicalDevice
DeviceIdWin32_KeyboardCIM_LogicalDevice
DeviceIdWin32_LogicalDiskCIM_LogicalDevice
DeviceIdWin32_MappedLogicalDiskCIM_LogicalDevice
DeviceIdWin32_MemoryArrayCIM_LogicalDevice
DeviceIdWin32_MemoryDeviceCIM_LogicalDevice
DeviceIdWin32_MotherboardDeviceCIM_LogicalDevice
DeviceIdWin32_NetworkAdapterCIM_LogicalDevice
DeviceIdWin32_ParallelPortCIM_LogicalDevice
DeviceIdWin32_PCMCIAControllerCIM_LogicalDevice
DeviceIdWin32_PnPEntityCIM_LogicalDevice
DeviceIdWin32_PointingDeviceCIM_LogicalDevice
DeviceIdWin32_PortableBatteryCIM_LogicalDevice
DeviceIdWin32_POTSModemCIM_LogicalDevice
DeviceIdWin32_ProcessorCIM_LogicalDevice
DeviceIdWin32_RefrigerationCIM_LogicalDevice
DeviceIdWin32_SCSIControllerCIM_LogicalDevice
DeviceIdWin32_SerialPortCIM_LogicalDevice
DeviceIdWin32_SMBIOSMemoryCIM_LogicalDevice
DeviceIdWin32_SoundDeviceCIM_LogicalDevice
DeviceIdWin32_TapeDriveCIM_LogicalDevice
DeviceIdWin32_TemperatureProbeCIM_LogicalDevice
DeviceIdWin32_USBControllerCIM_LogicalDevice
DeviceIdWin32_USBHubCIM_LogicalDevice
DeviceIdWin32_VideoControllerCIM_LogicalDevice
DeviceIdWin32_VoltageProbeCIM_LogicalDevice
DeviceIdWin32_VolumeCIM_LogicalDevice

Code samples for DeviceId property

Get instance of WMI class using GetObject, DeviceId property of CIM_Printer

Short VBS code - get a single specified instance of CIM_Printer class or get a default unnamed instance (singleton) of the class, using one single command GetObject with exact path of the wmi object.

'https://wutils.com/wmi/
Dim wmiObject
Set wmiObject = GetObject( _
 "WINMGMTS:\\.\ROOT\CIMV2\ms_409:" + _
 "CIM_Printer.PropertyName=""SomeText""")
Wscript.Echo wmiObject.DeviceId 'or other property name, see properties
See more VBS samples of CIM_Printer class

WMI query - sample windows WQL with C#, DeviceId property of CIM_Printer

Get a specified instance of CIM_Printer by a key, get a default unnamed instance (singleton) of the class or list instances of the class by wmi query using this c# sample code.
See in another language: VBScript, VB.Net.
//https://wutils.com/wmi/

//Project -> Add reference -> System.Management
//using System.Management;

//create a management scope object
ManagementScope scope = new ManagementScope("\\\\.\\ROOT\\CIMV2\\ms_409");

//create object query
ObjectQuery query = new ObjectQuery("SELECT * FROM CIM_Printer Where PropertyName=\"SomeText\"");

//create object searcher
ManagementObjectSearcher searcher =
                        new ManagementObjectSearcher(scope, query);

//get a collection of WMI objects
ManagementObjectCollection queryCollection = searcher.Get();

//enumerate the collection.
foreach (ManagementObject m in queryCollection) 
{
  // access properties of the WMI object
  Console.WriteLine("DeviceId : {0}", m["DeviceId"]);
  
}

WMI query - sample windows WQL with VB.Net, DeviceId property of CIM_Printer

Get a specified instance of CIM_Printer by a key, get a default unnamed instance (singleton) of the class or list instances of the class by wmi query using this VB.Net sample code.
See in another language: VBScript, C#
'Project -> Add reference -> System.Management
'Imports System.Management

'Get the namespace management scope
Dim Scope As New ManagementScope("\\.\ROOT\CIMV2\ms_409")

'Get a result of WML query 
Dim Query As New ObjectQuery("SELECT * FROM CIM_Printer Where PropertyName="SomeText"")

'Create object searcher
Dim Searcher As New ManagementObjectSearcher(Scope, Query)

'Get a collection of WMI objects
Dim queryCollection As ManagementObjectCollection = Searcher.Get

'Enumerate wmi object 
For Each mObject As ManagementObject In queryCollection
  'write out some property value
  Console.WriteLine("DeviceId : {0}", mObject("DeviceId"))
Next
comments powered by Disqus
WUtils.com