This script starts hardware inventory resynchronization on an SMS Advanced Client by deleting the hardware inventory action. The hardware inventory action is identified by the InventoryActionStatus.InventoryActionID property in the Advanced Client WMI namespace.

Example

Dim sInventoryActionID

sInventoryActionID="{00000000-0000-0000-0000-000000000001}"
'Change sInventoryActionID to {00000000-0000-0000-0000-000000000002} 
'for software inventory.
'Get a connection to the "root\ccm\invagt" namespace (where 
'the Inventory agent exists).
Dim oLocator
Set oLocator = CreateObject("WbemScripting.SWbemLocator")
Dim oServices
Set oServices = oLocator.ConnectServer( , "root\ccm\invagt")
'Delete the specified InventoryActionStatus instance. 
oServices.Delete "InventoryActionStatus.InventoryActionID=""" & sInventoryActionID & """"

Compiling the Code

  • Requires an SMS 2003 Advanced Client.

See Also