none
How do I force a full hardware inventory with SCCM?

    Question

  •  

    I am having an issue where some of my clients perform regular hardware inventories, but some do not.  Of the 1000 clients in my site, about 90 of them have not updated their inventory since around the time the client was installed or updated.

     

    The mp_hinv.log always shows the MIF being moved to the bad mifs directory because it couldn't find a full inventory to check it's data against.  Executing a hardware inventory from the client only attempts a delta and that is where I believe my problem lies.  The log does show a resync being attempted, but it never starts and the whole inventory process fails leaving me with an old inventory.  If I can force a full hardware inventory, I believe the deltas will run fine in the future. 

     

    How can I do that?  I have tried a few utilities from myitforum but they are all for older clients and didn't work.  Software inventory works fine on all clients.

     

     

    Monday, January 14, 2008 10:36 PM

Answers

  • Unfortunately, I don't believe we ever released a tool to do that. I know we released a tool that would force a inventory cycle (or other client actions), but not one that forces a full/resync inventory (that I know of).

     

    So all I would know would be to reinstall the client. That's fairly drastic, but all that I know of. Sorry about that, I'd have assumed someone would have published a VB script to do that by now.

    Monday, January 14, 2008 10:59 PM

All replies

  • Unfortunately, I don't believe we ever released a tool to do that. I know we released a tool that would force a inventory cycle (or other client actions), but not one that forces a full/resync inventory (that I know of).

     

    So all I would know would be to reinstall the client. That's fairly drastic, but all that I know of. Sorry about that, I'd have assumed someone would have published a VB script to do that by now.

    Monday, January 14, 2008 10:59 PM
  •  

    Thanks Wally,

     

    Beisdes reinstalling the client, are there any other steps involved in getting the inventory cleared?  What data can I delete?  I have reinstalled the client but the original hardware inventory scan still shows and it's first "new" hinv after the reinstall still fails in similar fashion.

    Monday, January 14, 2008 11:06 PM
  • I don't know any other way. If you reinstall the client, it will do a full inventory for its first cycle. I'd also delete the client from the All Systems collection also so there were no issues with that.

    Monday, January 14, 2008 11:15 PM
  •  Wally [MSFT] wrote:
    I don't know any other way.

     

    Maybe I do ...

    Open wbemtest and connect to root\ccm\invagt. Enum classes | recursive -> ok. Doubleclick InventoryActionStatus. Click Instances. Highlight the entry that contains {00000000-0000-0000-0000-000000000001}. Click delete. Close all wbemtest windows. Initiate a hardware inventory.

     

    Watch InventoryAgent.log for

     

    Inventory: Opening store for action {00000000-0000-0000-0000-000000000001} ... 
    Inventory: Delta report without a previous Full report; will do a Full report. 
    Inventory: Action=Hardware ReportType=Full 

     

    This can also be scripted ...

    • Proposed as answer by iBend Thursday, July 17, 2014 1:01 PM
    Tuesday, January 15, 2008 11:58 AM
  • Not sure that this is a supported method of doing so, would need to validate it.

    Tuesday, January 15, 2008 6:35 PM
  • Thanks for the replies.  The solution you offered me Wally worked, but to be more specific, forcing a reinstall of the client did not solve the problem for me.  I had to run the ccmsetup.exe /uninstall command to uninstall, then reinstall.  Simply choosing to install again apparently did not clean out all of the client information.

     

    I tried Torstens method as well to see if that would help.  I used CIM Studio to go in to ccm\invagt and delete the C00000000-0000-0000-0000-000000000001entry.  When I initiated a hinv, the logs did show a "Resync Full report" initiating (which never happened before), but it failed out with an error that it could not find a certain value.

     

    Simply repairing the inventory agent did not work either.

     

    So a full uninstall/reinstall worked for me.  I can now run inventory on those machines as many times as I want and it responds just fine.

     

    The background of my client was that they were originally SMS 2.0 clients upgraded to SCCM mixed mode.  The site then changed to native mode around the time I started experiencing these issues.  I'll just have to script an uninstall across the problem clients and reinstall them.

     

    Thanks for your help. Smile

    Tuesday, January 15, 2008 7:20 PM
  • Sorry, yes I should have been more specific. Almost exclusively, if I say "reinstall" I really mean "uninstall and then install again". Sorry about not being precise enough.

     

    We do NOT support upgrade from SMS 2.0 to SCCM. We only support upgrade from SMS 2003 SP2 or SP3 to SCCM. With that said, at one of my TAP customers, we did try to upgrade clients that had the SMS 2.0 client installed in their image, and had some inventory issues. They were cleaned up with the uninstall and then reinstall of the SCCM client. If you had mentioned this initially, I'd have specifically said that is what you needed to do, based on my experience.

     

    Glad you got it going and thanks for the followup on it.

     

    Tuesday, January 15, 2008 7:26 PM
  • awesome.  Thanks again for the tip.  In that case it's possible it will be easier to identify which clients I want to reinstall.  Do you know if there is a way to view which clients were updated and which were clean installs?

    Tuesday, January 15, 2008 7:28 PM
  • I can't think of anything in the admin console that would show that (could be, but I can't think of anything). I would think that the ccmsetup.log file would state it was an upgrade. But honestly I don't recall if it did or not.

     

    Tuesday, January 15, 2008 7:31 PM
  • <sorry to 'touch' an older thread>

     

    I just wanted to add that there will be example scripts in the SDK to reset hardware and software inventory, as well as example scripts to 'kick' the components:

     

    How to Reset the Hardware Inventory Cache

    How to Reset the Software Inventory Cache

    How to Run Hardware Inventory

    How to Run Software Inventory

     

    The scripts use the same method that Torsten pointed out.

     

    The SDK is still in beta, but we're workin' hard to get it out the door.

     

    Thanks,

     

    Jim Bradbury

    Thursday, January 24, 2008 7:21 AM
  •  "I know we released a tool that would force a inventory cycle (or other client actions), but not one that forces a full/resync inventory (that I know of)."

     

    I'd like to know the name  of this tool you described. If possible I'd run it remotely with command line switches to force a hardware inventory. I use the Configuration Manager/actions/Hardware Inventory Cycle, but I'd like to run it without using remote tools or physically going to the machine.

    Thanks, David Best

    Tuesday, July 08, 2008 3:43 PM
  • Torsten, I tried your method of forcing a full hardware inventory using wbemtest and it works great.

    Thanks

    Tuesday, July 08, 2008 3:51 PM
  • If you're looking to execute client actions remotely, take a look at the below SDK thread for some ideas and a code example:

     

    Remote Execute of Client Actions
    http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=3179844&SiteID=17

     

    I hope this helps!

     

    Jim Bradbury

     

    Tuesday, July 08, 2008 3:55 PM
  • Roger Zander posted the wmic.exe commands to automate Wally's wbemtest.exe procedures

    SMS/SCCM Command-line Actions
    http://www.myitforum.com/articles/8/view.asp?id=12006

    1) Delete the {00000000-0000-0000-0000-000000000001} instance of InventoryActionStatus

    WMIC /namespace:\\root\ccm\invagt path inventoryActionStatus where InventoryActionID="{00000000-0000-0000-0000-000000000001}" DELETE /NOINTERACTIVE

    2) initiate the hardware inventory

    c:\SMS2003Toolkit2>Sendsched.vbs {00000000-0000-0000-0000-000000000001}
    Thursday, September 24, 2009 5:44 PM
  • Torsten,

    Deleting the Inventory: Opening store for action {00000000-0000-0000-0000-000000000001} worked great for me.  I started seeing results quickly.

    thanks,

    Tuesday, March 01, 2011 6:35 PM
  • Sorry to dredge up an old post, but is there a link to the tool to force an inventory cycle?  I have about 1200/1500 computers which have the client installed but have never reported in. 
    -- Charles Octavian Düm MCP: Windows XP, ACSP: OSX 10.5
    Monday, March 21, 2011 8:22 PM
  • http://sourceforge.net/projects/smsclictr/
    Torsten Meringer | http://www.mssccmfaq.de
    Monday, March 21, 2011 8:52 PM
  • This looks very useful for an interface of working with single machines.  Can you use it to work with collections rather than single machines?
    -- Charles Octavian Düm MCP: Windows XP, ACSP: OSX 10.5
    Wednesday, March 23, 2011 7:06 PM
  • Yes, you can use it and you can intiate on multiple computers or collections using collection commander tool http://sourceforge.net/projects/smscollctr/

     


    //Eswar Koneti @ www.eskonr.com
    Friday, March 25, 2011 7:45 AM
  • The default download link downloads the 64-bit version. For anyone else watching this thread, here is a link to the download folder for both 32-bit and 64-bit.  http://sourceforge.net/projects/smscollctr/files/smscollctr/1.3.2/
    -- Charles Octavian Düm MCP: Windows XP, ACSP: OSX 10.5
    Monday, March 28, 2011 2:39 PM
  • After working a while to get SCCM Agent fully running during the OSD TS steps to approve the system, get policies and execute HINV I would like to submit my workarrounds.

    Simply run the below wmic commands in your OSD TS or normal TS to force the system to execute a FULL/DELTA HINV and restart the ccmexec service:

    FULL HINV:

    wmic /namespace:\\root\ccm\invagt path inventoryActionStatus where InventoryActionID="{00000000-0000-0000-0000-000000000001}" DELETE /NOINTERACTIVE

    wmic /namespace:\\root\ccm\scheduler path CCM_Scheduler_History where ScheduleID="{00000000-0000-0000-0000-000000000001}" DELETE /NOINTERACTIVE

     

    DELTA HINV:

    wmic /namespace:\\root\ccm\scheduler path CCM_Scheduler_History where ScheduleID="{00000000-0000-0000-0000-000000000001}" DELETE /NOINTERACTIVE

     

    Note:

    stop , wait 10 sec. and start ccmexec again after execution of the above commands. This will recreate the schedule for the HINV and execute the hardware inventory even in TS again and again....! :-)

    Otherwise you will need to wait till the MP reports a resync to the client after your configured HINV time on the client agent in SCCM!

    Do not use Trigger methods in OSD TS...as the SMS_CLIENT is not fully implemented and running even when resetting the provisioningmode! The SMS_CLIENT entries in wmi will be implemented after the first logon to the OS and not within the TS. If you do that it will stop your TS with an errorcode specific to an "Access Denied". If you want to do that just set "Continue on Error" or set the error code within the TS step so the TS will continue and will report the error only in the smsts.log file.

     

    Hope this information is helpful


    Tarkan Koemuercue
    Monday, June 27, 2011 12:10 PM
  • Apoligies to post to this old thread, but someone may find this useful.

    Below is the SDK vbscript that can be run to force Hardware Inventory.

     

    Dim controlPanelAppletManager
    Dim clientActions
    Dim clientAction

    actionNameToRun = "Hardware Inventory Collection Cycle"

    Set controlPanelAppletManager = CreateObject("CPApplet.CPAppletMgr")
      Set clientActions = controlPanelAppletManager.GetClientActions()
        For Each clientAction In clientActions
          If clientAction.Name = actionNameToRun Then
            clientAction.PerformAction 
          End If
        Next

    Friday, July 29, 2011 2:24 AM
  • I use this vbs script and works fine with Windows XP and Windows 7. The advantage of this script is you can see in InventoryAgent.log this line: <![LOG[Inventory: Action=Hardware ReportType=Full]LOG]!>

    '********************************************************************

    ' This sample code will kick off a Hardware Inventory resync on
    '  local SMS Advanced Client machine. This is accomplished in 2 steps:
    '
    '  1) Reset the Hardware Inventory cache
    '  2) Kickoff the Hardware Invetory cycle (which determines there are
    '     no items in the cache, and thus performs a resync)
    '

    Option Explicit

    ' Code execution begins here
    ' --------------------------------

    Main

    ' *******************************************************************
    ' Main() - This is the main subroutine of the script
    ' *******************************************************************

    Sub Main()

     ' Reset the Hardware Inventory Cache
     ResetInventoryCache "{00000000-0000-0000-0000-000000000001}"
     
     ' Kickoff a Hardware Inventory cycle
     KickoffClientAction "Hardware Inventory Collection Cycle"
     
     wscript.echo "Force Full Hardware Inventory Initiated"

    End Sub


    ' *******************************************************************
    ' 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")
     
     ' 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

    '********************************************************************

    I hope that helps community :-)

    Monday, November 28, 2011 2:36 PM