Accessing available application packages from within a task sequence

ritmo2k 706 Reputation points
2021-01-04T11:34:39.93+00:00

I have a PowerShell script that creates dynamic application variables based on collection variables set while starting the task sequence.

However, I have an issue with maintenance overhead, all the application names include the application version, and it's not uncommon to have at least three of each while supersedence keeps previous installations up to date with the current package. Every time an upgraded application is provisioned, I will need to manually edit the script and update the distribution points.

Is it possible to access available applications through the client during the task sequence in PowerShell (or c# / .net)? I would like to refactor the script to always select the most recent version of an application.

Microsoft Configuration Manager Deployment
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Deployment: The process of delivering, assembling, and maintaining a particular version of a software system at a site.
930 questions
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.
467 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jason Sandys 31,186 Reputation points Microsoft Employee
    2021-01-04T15:18:21.447+00:00

    Sure, it's possible to query the site for App info -- the SDK has lots of details on this: https://video2.skills-academy.com/en-us/mem/configmgr/develop/.

    However, the problem will be credentials as there is no user context during the task sequence to be able to do this so you'd have to prompt for the credentials of user that has the necessary permissions.

    There are two things that I can think of to address your challenge:

    1. Use a separate configuration file that is stored somewhere centrally (not your DPs and not in your package) that your script accesses to get the info. That way, when you update the configuration file, nothing needs to be updated in the script or on the DPs. The config file would be super small (I can't image more than 10 or 20 KB) and so would not cause any real issues.
    2. Use a web service to query the site for the info you need and call the web service from your script. The web service would be configured with the necessary permissions. This is technically a security hole though so you'd have to control and monitor the service and the account tightly.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. ritmo2k 706 Reputation points
    2021-01-05T10:21:05.217+00:00

    Thank you for the guidance, I think I have enough to solve this now.