powershell - How to retrieve an Application name from an AppModelName in C# -
i reading sccm database, , have table in have list of application. problem here applications registered appmodelname of form scopeid_0b39df1-4f55-4862-b68c-079246a08d9/application_280b7dac-23ea-4a00-9354-b094548f4169
, , pretty sure nobody able guess programm is. me neither. wanted create c# function possibly retrieve "real" name of software.
i saw powershell script working well, need same thing in c#, , can't figure out how it.
i tried execute powershell script in c# script, that's not clean appropriate solution in case (using c# requirement of script).
the problem that, far know, 2 line cannot converted in c# :
$applicationid = (get - wmiobject - namespace root\sms\site_$sitecode - computername $siteserver - class sms_deploymenttype - filter "contentid = '$contenid01' , priorityinlatestapp = '1'").appmodelname $app = (get - wmiobject - namespace root\sms\site_$sitecode - computername $siteserver - class sms_application - filter "ci_uniqueid '$applicationid%' , islatest = 'true'").localizeddisplayname
i don't know if of guys have idea of how that.
Comments
Post a Comment