Finding Task Sequences referenced by Applications or Packages

First off, Thanks to Adam for getting me 80% of the way there:
https://www.asquaredozen.com/2019/02/04/finding-configmgr-task-sequences-with-invalid-references/

But I wanted to find the Task Sequences that referenced a specific Application.

So in my case, I want to Delete Google Chrome, no point with the New Edge, right?

image

Lets find those TS references:

First we need to grab the Application Info:

Then all of the Task Sequence Info: (This can take awhile)

Then we loop through the Task Sequences looking for where the application is referenced.

Full Code for Applications:

What does that look like:
image

And there we have it, the 2 TS’s that reference the Google App
imageimage

 

Packages are nearly the same:

Get Package Info:

Full Code: (Had to change a spot in the if statement)

In Action:
image

 

Hope you find this helpful

GARYTOWN.COM

1 thought on “Finding Task Sequences referenced by Applications or Packages”

  1. This is such a common issue for us, and I’m all out of Excedrin 😂. Spreading this info to my junior admins.

    The last few entries on your blog have been of tremendous help to us. For the longest time, I’ve wanted to have checks and balances in our Task Sequences. I’m happy to report that work has begun thanks to your WaaS IPU series.

    Thanks for your expertise and time, as always.

    Jay

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.