Extend HealthInstallationRunningStatus


Hi Roger
Quite a long time ago since we last met...
Maybe i missed something or you already have a solution for my request:

In my opinion the HealthInstallationRunningStatus in the Automation Library (and in Collection Commander 2012) only checks and displays the status for running Update-Installations.
It would be great to be able to check for running Application- and Package-Installations as well.
We used this function under SCCM 2007 in our WakeOnLan-Shut-down-Script to be sure that all installations are finished before shutting down the clients.
Maybe there already is a simple WMI-Query or Powershell-Command to do this...
Closed Sep 30, 2014 at 1:24 PM by rzander


rzander wrote Aug 11, 2014 at 1:47 PM

I Agree; Have not realized that it only checks updates :-)

rzander wrote Aug 12, 2014 at 11:16 AM

I've updated the HealthCheck script: https://sccmclictrlib.codeplex.com/SourceControl/latest#sccmclictr.automation/Resources/HealthCheck.ps.txt

But this will only Show Jobs targeting the machine or the same user running this code. I was not able to find a method to detect if a Job for another user is running (specially when Application is targeting users).

If someone knows another way, let me know :-) !

JuergBaumgartner wrote Aug 12, 2014 at 2:53 PM

Hi Roger
Thanks a lot for your script. I will test it soon. For my purpose i don't need to check for running jobs for other users, because the shutdown-script only runs if no user is logged on...

By the way: The new Collection Commander and his ability to run any PS-Scripts is great! Thanks a lot.


JuergBaumgartner wrote Aug 14, 2014 at 11:43 AM

Your Script is working fine to check if there are running Applications, Updates or Packages (when i run it as user).
Strange behavior:
When i run the script in the SYSTEM-Context, i cannot Access the WMI-Object "CCM_Program" (it's empty for the SYSTEM-User). The other 2 Objects are OK. (see "http://social.technet.microsoft.com/Forums/en-US/b008a18e-2b6e-4f3e-ab1f-ba8c642b20cf/system-account-cannot-see-the-ccmprogram-class-within-client-wmi?forum=configmanagerosd")

In the CCM_SoftwareBase, which contains at least Packages and Applications, i can only retrieve application-entries as SYSTEM, but no Package-entries!?
In addition, i cannot find the values and their description about the CCM_Program EvaluationState in the SDK. The EvaluationState of the CCM_Application and CCM_SoftwareUpdates is documented.
Well, these issues are not critical, because 95 % of deployments are based on Applications and not Packages...
But maybe there is a similar problem with your detection-issue when a Job for another user is running.

wrote Sep 30, 2014 at 1:24 PM