This week I want to devote a blog post to finding dependent applications. Via the ConfigMgr Console it’s very easy to find the configured Dependencies of an Application, but what if I want to know which applications depend on a specific Application? Via the ConfigMgr Console this is not possible (out-of-the-box), but this doesn’t mean that the information is not accessible. In this blog post I will show where to find this information and I will show a complete script which will show the results in a nice form.
Solution
In WMI there is the class SMS_AppDependenceRelation. This class doesn’t contain any methods, but does contain a few interesting properties. These interesting properties are FromApplicationCIID, FromDeploymentTypeCIID, ToApplicationCIID and ToDeploymentTypeCIID. The properties mainly speak for themselves, they contain the CI IDs of the Applications and Deployment Types that depend on each other. The ConfigMgr Console shows the From-To relations and, in this post, I’m searching for the To-From relations. So to get the Applications that depend on a specific Application(CIID), I use the following code snippet:
$DependentApplications = Get-WmiObject -Class SMS_AppDependenceRelation ` -Namespace root/SMS/site_$($SiteCode) -ComputerName $SiteServer ` -Filter "ToApplicationCIID='$ApplicationCIID'"
Now that I know where to get the information, I need to be able to translate it to something readable. For that I will use the class SMS_ApplicationLatest for the Applications and the class SMS_DeploymentType for the Deployment Types and, in both cases, I locate the property LocalizedDisplayName to get a readable name. So to get, for example, the Application name, I use the following code snippet:
$ApplicationName = (Get-WmiObject -Class SMS_ApplicationLatest ` -Namespace root/SMS/site_$($SiteCode) -ComputerName $SiteServer ` -Filter "CI_ID='$ApplicationCIID'").LocalizedDisplayName
Result
The complete script will show the results of the dependent Applications in a nice form and is available via the TechNet Galleries. The nice thing about the form is that it can also be used as a right-click action. The usage of the script is with the article on the galleries. Please let me know what you think of the script.
>> Available via download here on the TechNet Galleries! <<
Discover more from All about Microsoft Intune
Subscribe to get the latest posts sent to your email.
Hi, Peter
Great tips. You’re quite ubiquitous in my google searches now! Ha
This doesn’t appear to apply so much to SCCM 2016 now. Have the WMI classes and namespace organisation changed? I can’t find the SMS_AppDependenceRelation class or any appropriate classes (with my limited WMI knowledge). Do Microsoft even document this information in a timely and accurate manner?
Thanks for everything!
Hi James,
I just checked on my 1710 primary site server and I still see the mentioned WMI class..
Regards, Peter
Hi Peter, I agree with the others, you have good posts! But is this the same as going to the application properties “References” tab?
Regards,
Bradd
Hi Bradd,
Yes, the console provides nearly all the information already nowadays.
Regards, Peter
Hi Peter,
Can above method be done with powershell cmdlet? or is the only way atm?
Hi LongQ,
You mean something like this: https://docs.microsoft.com/en-us/powershell/module/configurationmanager/get-cmdeploymenttypedependency?view=sccm-ps?
Regards, Peter
not quiet,.
The command will list what “App1” have dependency
App1 ( denpendencies: App2 & App3)
But what i need is the other way round. Look at App3 and see which app has this as a dependencie
Hi LongQ,
In that case just use WMI as shown in this post.
Regards, Peter
Hey Peter,
thx for this article. But i cannot find the script in the TechNet. I believe the link is invalid. Can you provide me an other way to your script?
BR Oehler
Hi Oehler,
I’ve now moved the most requested scripts to a GitHub repository. This specific script can be found here: https://github.com/pvanderwoude/blog/blob/main/Show-DependentApplications.ps1
Regards, Peter
Hi Peter,
The TechNet Gallery doesn’t have this anymore, is it available elsewhere please?
Hi Shaun,
I’ve now moved the most requested scripts to a GitHub repository. This specific script can be found here: https://github.com/pvanderwoude/blog/blob/main/Show-DependentApplications.ps1
Regards, Peter
Hi Peter, great script !
By any chance, is there a version that would output to CSV (or even return a table to default output) ?
Hi Nicolas,
Yes that should be possible with some minor adjustments.
Regards, Peter
Thanks Peter
I was able to adapt it easily.
If you would like to see that version let me know !
Of course I would like to see that version Nicolas 🙂
Regards, Peter
Hi Peter, perhaps I can email you the file or post some other way ? It keeps removing certain parts when I post.
Regards, Nicolas
Hi Nicolas,
Yes, that would be great! You can use the contact form. When that provides the same issue, I’ll contact you via mail.
Regards, Peter
Hi Peter ! Thanks for your reply. I have posted it via the contact form.
Nicolas
Thank you, Nicolas!
Hi Nicolas, can i get a copy of your modified script that outputs to a csv file?
/regards
Peter.
Wow, greate script. Thank’s!
Thank you, Tony!