简体   繁体   English

查询 SCCM 应用程序

[英]query SCCM apps

Is there any table in the SCCM database that returns all applications located in a subfolder? SCCM 数据库中是否有任何表可以返回位于子文件夹中的所有应用程序? This table returns all application and packages: "v_Package" but i need to filter only applications and only the ones in a specific subfolder.此表返回所有应用程序和包:“v_Package”,但我只需要过滤应用程序和特定子文件夹中的应用程序。 i also found the table "v_Applications" in my SQL server that returns only the applications but it is not present in the microsoft docs: https://docs.microsoft.com/en-us/mem/configmgr/develop/core/understand/sqlviews/application-management-views-configuration-manager is that normal?我还在我的 SQL 服务器中找到了表“v_Applications”,它只返回应用程序,但它不存在于微软文档中: https://docs.microsoft.com/en-us/mem/configmgr/develop/core/understand /sqlviews/application-management-views-configuration-manager正常吗? Could someone point me in the right direction?有人能指出我正确的方向吗?

Thank you very much非常感谢

The best "trick" if you want to do something that is possible in the SCCM Console via SQL is to do it and then watch SMSProv.log on your siteserver which will tell you what SQL and WQL command was used to produce your result.如果您想通过 SQL 在 SCCM 控制台中执行可能的操作,那么最好的“技巧”就是执行此操作,然后在您的站点服务器上观看 SMSProv.log,它会告诉您 SQL 和 WQL 命令用于生成您的结果。 That is always a good point towards the direction you should take.这始终是您应该采取的方向的一个好点。

In this case you will see that the query takes the applications info from a function call fn_ListApplicationCIs_List(1031) which features a Column ObjectPath that is your folder so a quick在这种情况下,您将看到查询从 function 调用fn_ListApplicationCIs_List(1031)获取应用程序信息,该调用具有一个 Column ObjectPath 是您的文件夹,所以快速

select DisplayName, ObjectPath from fn_ListApplicationCIs_List(1031) 

should probably give you what you want.可能应该给你你想要的。

The real info if you wanna go deeper is as far as I understand it in a view called vFolderMembers (which weirdly only contains those that are not in root) but going from there you would have to join some internal IDs to get to a readable name.如果你想更深入地了解 go 的真实信息,据我所知,它在一个名为 vFolderMembers 的视图中(奇怪的是只包含那些不在根目录中的)但是从那里开始你必须加入一些内部 ID 才能获得一个可读的名称.

To also answer your other question: Yes v_Applications is a normal table but it does not contain the object Path (which is only relevant within the context of the console and not deployment) and yes it is (sadly) normal that Microsofts documentation is not always the best and never really complete in regards to SCCM matters.还要回答您的其他问题:是的 v_Applications 是一个普通表,但它不包含 object 路径(仅在控制台上下文中相关,与部署无关),是的(遗憾的是)微软文档并不总是正常就 SCCM 事宜而言,最好但从未真正完成过。

wow that's great.哇,太好了。 what a relief.终于解脱了。 i've been struggling with that for a while.我已经为此苦苦挣扎了一段时间。

thank you so much for your help.非常感谢你的帮助。 it works exacly as i need.它完全按照我的需要工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM