Is there a command line to immediately update SCCM after an app has been installed?
Forgive my ignorance...I was asked if there is any sort of command line that could be placed at the end of an install to update SCCM that the application had been installed. Of course this is a manager looking for real time reporting lol But I poked around and didnt come across anything and thought I would ask and see if anyone had thoughts??
Answers (2)
Run the below script at the end of the install to update software inventory. You can also run a report to see what devices have completed the given advertisement.
You can trigger the below VBScript to force software inventory:
sInventoryActionID = "{00000000-0000-0000-0000-000000000002}"
Set oLocator = CreateObject("WbemScripting.SWbemLocator")
Set oServices = oLocator.ConnectServer( , "root\ccm\invagt")
oServices.Delete "InventoryActionStatus.InventoryActionID=""" & sInventoryActionID & """"
wscript.sleep 3000
Set cpApplet = CreateObject("CPAPPLET.CPAppletMgr")
Set actions = cpApplet.GetClientActions
For Each action In actions
If Instr(action.Name,"Software Inventory") > 0 Then
action.PerformAction
End if
Next
Comments:
-
This chappie is on the right path imho. There is no command line, and it's not how Config Manager is meant to work. However you could force the machine to run an inventory... unless it is esential to have the status message sent back to the MP immediately, I'd leave it and let the client handle things as it normally would. - Rashmika 12 years ago
-
Wouldn't it be better to run a Hardware Inventory, seeing as Add/Remove Programs inventory data is stored in HWINV?
I would just run the the "Status of a specific advertisement" report and give management a link to that report. - jlai 12 years ago