myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


           



Force hardware inventory

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> Force hardware inventory Page: [1]
Login
Message << Older Topic   Newer Topic >>
Force hardware inventory - 5/6/2008 2:00:18 AM   
Peekstra

 

Posts: 26
Score: 0
Joined: 2/7/2008
Status: offline
After installing an update via WOL during the maintance hours, I would like to force a hardware inventory scan before shutting down the clients.

After some searching I found that you should use cliutils.exe or you could manually start the SMS hardware service when using SMS.

However, cliutils.exe isn't present on the SCCM CD and I couldn't find a sms hardware service so my question is, how can I accomplish this with SCCM?

thanks!


Peek.
Post #: 1
RE: Force hardware inventory - 5/6/2008 10:17:19 AM   
phaustein


Posts: 772
Score: 28
Joined: 3/21/2005
From: Washington, DC
Status: offline
Run this vbscript after your program has finished and it will force a HW inventory to execute.

' Reset the Hardware Inventory Cache
'ResetInventoryCache "{00000000-0000-0000-0000-000000000001}"

' Kickoff a Hardware Inventory cycle
KickoffClientAction "Hardware Inventory Collection Cycle"

'MsgBox "Hardware Inventory Resync Initiated"


' *******************************************************************
' ResetInventoryCache() - This sub will reset the inventory cache for the specified inventory action
' *******************************************************************
'Sub ResetInventoryCache(sInventoryActionID)

' Get a connection to the "root\ccm\invagt" namespace (where the Inventory agent lives)
' Dim oLocator
' Set oLocator = CreateObject("WbemScripting.SWbemLocator")
' Dim oServices
' Set oServices = oLocator.ConnectServer( , "root\ccm\invagt")
' If isnull (oServices) Then
'code for logging
' Exit Sub
' End if
' Delete the specified InventoryActionStatus instance
' oServices.Delete "InventoryActionStatus.InventoryActionID=""" & sInventoryActionID & """"
'End Sub
' *******************************************************************
' KickoffClientAction() - This sub will kickoff the specified client action
' *******************************************************************
Sub KickoffClientAction(sActionName)
' Create a CPAppletMgr instance
Dim oCPAppletMgr
Set oCPAppletMgr = CreateObject("CPApplet.CPAppletMgr")
' Get the available ClientActions
Dim oClientActions
set oClientActions = oCPAppletMgr.GetClientActions()
' Loop through the available client actions
Dim oClientAction
For Each oClientAction In oClientActions

 ' Is this the action we want to kickoff?
 If oClientAction.Name = sActionName Then
 
  ' Kickoff the action
  oClientAction.PerformAction      
 End If
Next
End Sub

_____________________________

Hope this helps.
Paul

(in reply to Peekstra)
Post #: 2
RE: Force hardware inventory - 5/7/2008 4:46:40 AM   
Peekstra

 

Posts: 26
Score: 0
Joined: 2/7/2008
Status: offline
That certainly helps! Thanks!

(in reply to phaustein)
Post #: 3
Page:   [1]
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> Force hardware inventory Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.234