本文介绍了基础知识 - 快速脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

寻找 用于拉取ComputerName的脚本,该程序对所有应用程序进行分组。 我正在使用项目运营商:

Looking  for a script to pull ComputerName which groups all app.  I am using the project operator:

搜索(UAApp)重要性=="重要""和IsRollup == true和RollupLevel ==" Granular"

|其中(AppName =="Varian Eclipse Client"或AppName =="Varian InSightive Desktop"或AppName =="Varian InSightive Client"或AppName =="Varian PrescribeTreatment"或AppName =="Varian Unified Reports Client" ;
或AppName ==" Varian MIRS"或AppName ==" Varian Patient Explorer"或AppName ==" Varian Portal Dosimetry"或AppName ==" Varian DICOM Daemon"或AppName ==" Varian Fonts"或AppName =="Varian Prescribe
Treatment"或AppName ==" Varian ARIA Deluxe Reports"或AppName ==" Varian ARIA Import Export"或AppName ==" Varian ARIA Offline Review"或AppName =="Varian Image Browser"或AppName =="Varian Application
Frame"或AppName =="Varian ARIA Practice Management Client"或AppName =="Varian DA Client"或AppName == "Varian Platform Client"或AppName ==" Varian RT总结"或AppName =="Varian ARIA Automated Pre-requisite
Installer - v13.6"或AppName =="Varian Keystone Agent"或AppName =="瓦里安治疗准备"或AppName =="Varian ARIA Automated Pre-requisite Installer - v11"或AppName =="Varian ARIA UnifiedWorklist"
) 

|按TotalInstalls desc排序

|项目计算机名称$
// Oql:重要性=="重要" Type = UAApp IsRollup = true RollupLevel = Granular | sort TotalInstalls desc

search in (UAApp) Importance == "Important" and IsRollup == true and RollupLevel == "Granular"
| where ( AppName == "Varian Eclipse Client" or AppName == "Varian InSightive Desktop" or AppName == "Varian InSightive Client" or AppName == "Varian PrescribeTreatment" or AppName == "Varian Unified Reports Client" or AppName == "Varian MIRS" or AppName == "Varian Patient Explorer" or AppName == "Varian Portal Dosimetry" or AppName == "Varian DICOM Daemon" or AppName == "Varian Fonts" or AppName == "Varian Prescribe Treatment" or AppName == "Varian ARIA Deluxe Reports" or AppName == "Varian ARIA Import Export" or AppName == "Varian ARIA Offline Review" or AppName == "Varian Image Browser" or AppName == "Varian Application Frame" or AppName == "Varian ARIA Practice Management Client" or AppName == "Varian DA Client" or AppName == "Varian Platform Client" or AppName == "Varian RT Summary" or AppName == "Varian ARIA Automated Pre-requisite Installer - v13.6" or AppName == "Varian Keystone Agent" or AppName == "Varian Treatment Preparation" or AppName == "Varian ARIA Automated Pre-requisite Installer - v11" or AppName == "Varian ARIA UnifiedWorklist" ) 
| sort by TotalInstalls desc
|project ComputerName
// Oql: Importance == "Important" Type=UAApp IsRollup=true RollupLevel=Granular | sort TotalInstalls desc

推荐答案

您可以使用运营商对结果进行分组并生成上述列表。 运算符只选择要包含,重命名或删除的列,以及插入新的计算列,而汇总会生成一个聚合输入表内容的表。

You can use the summarize operator to group your results and produce the said list. The project operator only selects the columns to include, rename or drop, and insert new computed columns, whereas summarize produces a table that aggregates the content of the input table.

此外,它看起来像  UAApp 表格没有
ComputerName
 列,而是计算机。 PFA截图供您参考。

Also, it looks like the UAApp Table doesn't have the ComputerName column, but has Computer instead. PFA the screenshot for your reference.

请检查使用摘要是否可以帮助您达到要求,或者随时回复问题。

Please check if using summarize helps you achieve your requirement, else feel free to revert with questions.

希望这会有所帮助!


这篇关于基础知识 - 快速脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-06 03:54