HP DL360 HP Insight Management WBEM Providers for Windows Server 2003 and Wind - Page 15

Scripting commands for HP Insight Management Agents 7.70 or later

Page 15 highlights

Scripting commands for HP Insight Management Agents 7.70 or later To uninstall HP Insight Management Agents, run the following Microsoft® Visual Basic Scripting Edition (VBScript) code from a Windows® command prompt on a target system: strComputer = "." SW = "HP Insight Management Agents" Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" _ & strComputer & "\root\cimv2") Set colSoftware = objWMIService.ExecQuery _ ("Select * from Win32_Product") For Each objSoftware in colSoftware If objSoftware.Name=SW Then objSoftware.Uninstall() End If Next Uninstalling SNMP-Based HP Insight Management Agents 15

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41

Uninstalling SNMP-Based HP Insight Management Agents
15
Scripting commands for HP Insight Management Agents 7.70 or
later
To uninstall HP Insight Management Agents, run the following Microsoft® Visual Basic Scripting Edition
(VBScript) code from a Windows® command prompt on a target system:
strComputer = "."
SW = "HP Insight Management Agents"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colSoftware = objWMIService.ExecQuery _
("Select * from Win32_Product")
For Each objSoftware in colSoftware
If objSoftware.Name=SW Then
objSoftware.Uninstall()
End If
Next