Home Page

WMI

IT

 

ms-help: Managing Windows with WMI

Win32_PrintJob, Win32_Printer, Win32_NetworkAdapter, Win32_NetworkAdapterConfiguration, Win32_OperatingSystem, Win32_Process


How to invoke:
Dim Query As String
Query = "Select * FROM Win32_NetworkAdapterConfiguration"
Dim JobQuery As New System.Management.ManagementObjectSearcher(Query)
Dim Jobs As Management.ManagementObjectCollection = JobQuery.Get()
For Each Job As Management.ManagementObject In Jobs
	'List properties.
	Dim properties As Management.PropertyDataCollection = Job.Properties
	For Each pd As Management.PropertyData In properties
		Debug.WriteLine(pd.Name)
	Next
Next Job

Also

Imports System
Imports System.Management
Public Class Sample

    Public Overloads Shared Function Main( _
    ByVal args() As String) As Integer

        Dim o As New ManagementObject

        ' Specify the WMI path to which this object should be bound to
        o.Path = New ManagementPath( _
            "Win32_Process.Name=""calc.exe""")

        Return 0
    End Function
End Class

Win32_PrintJob, Win32_Printer

Win32_NetworkAdapter:

Availability
NetConnectionStatus
NetworkAddresses
Name
Status
StatusInfo

Win32_NetworkAdapterConfiguration:

ArpAlwaysSourceRoute
ArpUseEtherSNAP
Caption
DatabasePath
DeadGWDetectEnabled
DefaultIPGateway
DefaultTOS
DefaultTTL
Description
DHCPEnabled
DHCPLeaseExpires
DHCPLeaseObtained
DHCPServer
DNSDomain
DNSDomainSuffixSearchOrder
DNSEnabledForWINSResolution
DNSHostName
DNSServerSearchOrder
DomainDNSRegistrationEnabled
ForwardBufferMemory
FullDNSRegistrationEnabled
GatewayCostMetric
IGMPLevel
Index
IPAddress
IPConnectionMetric
IPEnabled
IPFilterSecurityEnabled
IPPortSecurityEnabled
IPSecPermitIPProtocols
IPSecPermitTCPPorts
IPSecPermitUDPPorts
IPSubnet
IPUseZeroBroadcast
IPXAddress
IPXEnabled
IPXFrameType
IPXMediaType
IPXNetworkNumber
IPXVirtualNetNumber
KeepAliveInterval
KeepAliveTime
MACAddress
MTU
NumForwardPackets
PMTUBHDetectEnabled
PMTUDiscoveryEnabled
ServiceName
SettingID
TcpipNetbiosOptions
TcpMaxConnectRetransmissions
TcpMaxDataRetransmissions
TcpNumConnections
TcpUseRFC1122UrgentPointer
TcpWindowSize
WINSEnableLMHostsLookup
WINSHostLookupFile
WINSPrimaryServer
WINSScopeID
WINSSecondaryServer

Win32_OperatingSystem

class Win32_OperatingSystem : CIM_OperatingSystem
{
  string BootDevice;
  string BuildNumber;
  string BuildType;
  string Caption;
  string CodeSet;
  string CountryCode;
  string CreationClassName;
  string CSCreationClassName;
  string CSDVersion;
  string CSName;
  sint16 CurrentTimeZone;
  boolean DataExecutionPrevention_32BitApplications;
  boolean DataExecutionPrevention_Available;
  boolean DataExecutionPrevention_Drivers;
  boolean Debug;
  string Description;
  boolean Distributed;
  uint32 EncryptionLevel;
  uint8 ForegroundApplicationBoost;
  uint64 FreePhysicalMemory;
  uint64 FreeSpaceInPagingFiles;
  uint64 FreeVirtualMemory;
  datetime InstallDate;
  uint32 LargeSystemCache;
  datetime LastBootUpTime;
  datetime LocalDateTime;
  string Locale;
  string Manufacturer;
  uint32 MaxNumberOfProcesses;
  uint64 MaxProcessMemorySize;
  string Name;
  uint32 NumberOfLicensedUsers;
  uint32 NumberOfProcesses;
  uint32 NumberOfUsers;
  string Organization;
  uint32 OSLanguage;
  uint32 OSProductSuite;
  uint16 OSType;
  string OtherTypeDescription;
  Boolean PAEEnabled;
  string PlusProductID;
  string PlusVersionNumber;
  boolean Primary;
  uint32 ProductType;
  uint8 QuantumLength;
  uint8 QuantumType;
  string RegisteredUser;
  string SerialNumber;
  uint16 ServicePackMajorVersion;
  uint16 ServicePackMinorVersion;
  uint64 SizeStoredInPagingFiles;
  string Status;
  uint32 SuiteMask;
  string SystemDevice;
  string SystemDirectory;
  string SystemDrive;
  uint64 TotalSwapSpaceSize;
  uint64 TotalVirtualMemorySize;
  uint64 TotalVisibleMemorySize;
  string Version;
  string WindowsDirectory;
};
Method Description
Reboot Class method that shuts down the computer system, and then restarts it.
SetDateTime Class method that allows setting the computer date and time.
Shutdown Class method that unloads programs and DLLs to the point where it is safe to turn off the computer.
Win32Shutdown Class method that provides the full set of shutdown options supported by Windows operating systems.

 

Win32_Process