Hey there, here’s Martin again.
Today I needed to get the Name of an application based on a Content Id from the ContentTransferManager.log:
CTM job {6B767521-D8A8-410B-A572-AF4F6AFD4457} (corresponding DTS job {1EFC1FD9-C3B1-4B25-B879-18EC8F5CD152}) started download from ‘http://$FQDN_DP/SMS_DP_SMSPKG$/Content_b6256e4e-0278-4264-8e7c-b8fea60684d5.1’ for full content download.
If you would like the command prepared for you in this blog, you have to copy the string Content_b6256e4e-0278-4264-8e7c-b8fea60684d5.1 (correct it to your appropriate string) and open a Powershell session with a User Account that can connect to the SMS Provider Server through WMI. The SCCM cmdlets are not used within this commands. Define the variable $ContenId01 with this command:
$ContenId01 = (("Content_b6256e4e-0278-4264-8e7c-b8fea60684d5.1").Split("."))[0]
Now you can get the values of this deployment type, don’t forget to set your SMS Provider and your SiteCode in the Get-WMIObject command:
Get-WmiObject -Namespace root\sms\site_[YOUR SITECODE] -ComputerName [HERE COMES YOUR SMS PROVIDER!] -Class SMS_Deploymenttype -Filter "ContentID = '$ContenId01'
But we don’t need all of the Information, we only Need the AppModelName Instance, so we put this value into a variable:
$ApplicationID = (Get-WmiObject -Namespace root\sms\site_[YOUR SITECODE] -ComputerName [HERE COMES YOUR SMS PROVIDER!] -Class SMS_Deploymenttype -Filter "ContentID = '$ContenId01' and PriorityInLatestApp = '1'").AppModelName
With this Information, we now can kindly ask the class SMS_Application to tell us the Name of the Application. This PoSh-Command will serve us this:
(Get-WmiObject -Namespace root\sms\site_[YOUR SITECODE] -ComputerName [HERE COMES YOUR SMS PROVIDER!] -Class SMS_Application -Filter "CI_UniqueID like '$ApplicationID%' and IsLatest = 'True'").LocalizedDisplayName
Your Powershell console should look like this:
Hope this helps someone in the same adventure 🙂
Leave a Reply to Martin Wüthrich Cancel reply