Hp Insight Management WBEM Providers Manual de usuario Pagina 21

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 33
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 20
For Each objOperationalStatus in objComputerSystem.OperationalStatus
WScript.Echo "Operational status: " & objOperationalStatus
Next
Next
The following VBScript code is used to display system firmware version:
strComputer = "."
strNamespace = "\root\hpq"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & strNamespace)
Set colSystemROMFirmware = objWMIService.ExecQuery("Select * from HP_SystemROMFirmware")
For Each objSystemROMFirmware in colSystemROMFirmware
WScript.Echo "Caption: " & objSystemROMFirmware.Caption
WScript.Echo "Version: " & objSystemROMFirmware.VersionString
WScript.Echo
Next
This VBScript code is used to display computer system chassis model name, serial number and
asset tag:
strComputer = "."
strNamespace = "\root\hpq"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & strNamespace)
Set colComputerSystemChassis = objWMIService.ExecQuery("Select * from HP_ComputerSystemChassis")
For Each objComputerSystemChassis in colComputerSystemChassis
WScript.Echo "Model: " & objComputerSystemChassis.Model
WScript.Echo "Serial number: " & objComputerSystemChassis.SerialNumber
WScript.Echo "Asset tag: " & objComputerSystemChassis.UserTracking
Next
This VBScript code is used to list system memory modules and their capacities:
strComputer = "."
strNamespace = "\root\hpq"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & strNamespace)
Set colMemoryModule = objWMIService.ExecQuery("Select * from HP_MemoryModule")
For Each objMemoryModule in colMemoryModule
WScript.Echo "Caption: " & objMemoryModule.Caption
WScript.Echo "Capacity (bytes): " & objMemoryModule.Capacity
Wscript.Echo
Next
This VBScript code is used to list system processors, current clock speed, and the number of enabled
cores:
strComputer = "."
strNamespace = "\root\hpq"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & strNamespace)
Set colProcessor = objWMIService.ExecQuery("Select * from HP_Processor")
For Each objProcessor in colProcessor
WScript.Echo "Caption: " & objProcessor.Caption
WScript.Echo "Description: " & objProcessor.Description
WScript.Echo "Current clock speed (MHz): " & objProcessor.CurrentClockSpeed
WScript.Echo "Number of enabled cores: " & objProcessor.NumberOfEnabledCores
Wscript.Echo
Next
Microsoft Visual Basic Scripting Edition examples 21
Vista de pagina 20
1 2 ... 16 17 18 19 20 21 22 23 24 25 26 ... 32 33

Comentarios a estos manuales

Sin comentarios