/build/static/layout/Breadcrumb_cap_w.png

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??


0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
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.
Posted by: adilrathore 11 years ago
4th Degree Black Belt
3

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 11 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 11 years ago
Posted by: GAKIS 11 years ago
Fourth Degree Green Belt
0

You will not get real time data with SCCM the way it is designed to work, i would:

1. run reports to see what devices have completed the advertisement 

or

2. add adilrathore's script to the end of the install to update software inventory.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ