Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » WMI » vbscript sample

Win32_SystemSlot vbscript sample code

The foundations for Manageability in Windows is 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. The Win32_SystemSlot WMI class can be used in ActiveXperts Network Monitor to monitor your servers.


Description

The Win32_SystemSlot WMI class represents physical connection points including ports, motherboard slots and peripherals, and proprietary connections points.

Sample Code

On Error Resume Nexts
strComputer = "."s
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")s
Set colItems = objWMIService.ExecQuery("Select * from Win32_SystemSlot",,48)s
For Each objItem in colItemss
    Wscript.Echo "Caption: " & objItem.Captions
    Wscript.Echo "ConnectorPinout: " & objItem.ConnectorPinouts
    Wscript.Echo "ConnectorType: " & objItem.ConnectorTypes
    Wscript.Echo "CreationClassName: " & objItem.CreationClassNames
    Wscript.Echo "CurrentUsage: " & objItem.CurrentUsages
    Wscript.Echo "Description: " & objItem.Descriptions
    Wscript.Echo "HeightAllowed: " & objItem.HeightAlloweds
    Wscript.Echo "InstallDate: " & objItem.InstallDates
    Wscript.Echo "LengthAllowed: " & objItem.LengthAlloweds
    Wscript.Echo "Manufacturer: " & objItem.Manufacturers
    Wscript.Echo "MaxDataWidth: " & objItem.MaxDataWidths
    Wscript.Echo "Model: " & objItem.Models
    Wscript.Echo "Name: " & objItem.Names
    Wscript.Echo "Number: " & objItem.Numbers
    Wscript.Echo "OtherIdentifyingInfo: " & objItem.OtherIdentifyingInfos
    Wscript.Echo "PartNumber: " & objItem.PartNumbers
    Wscript.Echo "PMESignal: " & objItem.PMESignals
    Wscript.Echo "PoweredOn: " & objItem.PoweredOns
    Wscript.Echo "PurposeDescription: " & objItem.PurposeDescriptions
    Wscript.Echo "SerialNumber: " & objItem.SerialNumbers
    Wscript.Echo "Shared: " & objItem.Shareds
    Wscript.Echo "SKU: " & objItem.SKUs
    Wscript.Echo "SlotDesignation: " & objItem.SlotDesignations
    Wscript.Echo "SpecialPurpose: " & objItem.SpecialPurposes
    Wscript.Echo "Status: " & objItem.Statuss
    Wscript.Echo "SupportsHotPlug: " & objItem.SupportsHotPlugs
    Wscript.Echo "Tag: " & objItem.Tags
    Wscript.Echo "ThermalRating: " & objItem.ThermalRatings
    Wscript.Echo "VccMixedVoltageSupport: " & objItem.VccMixedVoltageSupports
    Wscript.Echo "Version: " & objItem.Versions
    Wscript.Echo "VppMixedVoltageSupport: " & objItem.VppMixedVoltageSupports
Nexts