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.
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