Service - WMI sample in Powershell
The foundations for Manageability in Windows 2019/2012/2008/ and Windows 10/8/7/Vista/XP are Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM).
ActiveXperts Network Monitor provides the ability to build monitor check routines based on WMI. ActiveXperts has collected more than a hundred WMI samples. You can use these samples as a base for new check routines you can write yourself.
On this site, you can find many WMI samples.
The Service WMI class can be used in ActiveXperts Network Monitor to monitor your servers.
Service
Example(s)
$strComputer = "." $objWMi = get-wmiobject -computername localhost -Query "Select * from CIM_Service" foreach ($obj in $objWmi) { write-host "Caption:" $obj.Caption write-host "ConfigFile:" $obj.ConfigFile write-host "CreationClassName:" $obj.CreationClassName write-host "DataFile:" $obj.DataFile write-host "DefaultDataType:" $obj.DefaultDataType write-host "DependentFiles:" $obj.DependentFiles write-host "Description:" $obj.Description write-host "DriverPath:" $obj.DriverPath write-host "FilePath:" $obj.FilePath write-host "HelpFile:" $obj.HelpFile write-host "InfName:" $obj.InfName write-host "InstallDate:" $obj.InstallDate write-host "MonitorName:" $obj.MonitorName write-host "Name:" $obj.Name write-host "OEMUrl:" $obj.OEMUrl write-host "Started:" $obj.Started write-host "StartMode:" $obj.StartMode write-host "Status:" $obj.Status write-host "SupportedPlatform:" $obj.SupportedPlatform write-host "SystemCreationClassName:" $obj.SystemCreationClassName write-host "SystemName:" $obj.SystemName write-host "Version:" $obj.Version write-host write-host "########" write-host }