SCCM script to update an application

Ed K 21 Reputation points
2022-11-28T16:49:42.363+00:00

We have an internal application that is updated every 2 weeks or so. For the SCCM application, the detection method is based on the version number of the exe that is installed as a part of the app.

I'd like to automate the update of the detection method via a powershell script, but I've never tried this before.

What I want is a script I can run on a scheduled basis. Once a week or so, the script checks the exe file that resides in my source directory. If the version number of the exe no longer matches the version of the package, it will update the version number in the detection method of my app. I can have the script then update the package on the DPs, and voila, the app is then updated during the next maintenance window.

Can someone help me with a script to perform this?

Microsoft Configuration Manager Application
Microsoft Configuration Manager Application
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Application: A computer program designed to carry out a specific task other than one relating to the operation of the computer itself, typically to be used by end users.
470 questions
Microsoft Configuration Manager
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Garth Jones 1,656 Reputation points
    2022-11-28T17:34:38.087+00:00

    IMO there are two easier options.

    One look at program, there can be updated on a schedule.
    Two, use powershell, create a new application each time and supersede the old one. This one will be harder.

    1 person found this answer helpful.
    0 comments No comments

  2. Ed K 21 Reputation points
    2022-11-28T18:37:56.867+00:00

    Thanks Garth,

    Using a program is an option.. but I'd prefer an app... then I can verify that all the systems are running the newest versions.

    Option two is kind of what I'm asking for. But, if I have to create a new app, I have to create a new detection method anyway. seems to me that all I need to do is update an existing detection method and/or delete and old and recreate a new detection method.

    0 comments No comments