以下代码起作用
let names = dynamic(['Windows Installer', 'Software Protection']);
ConfigurationChange
| where Computer like "SRV"
| where SvcPreviousState == "Running"
| where SvcState == "Stopped"
// | where SvcDisplayName in (names)
| order by TimeGenerated如注释所示,我只想检查SvcDisplayName的列表。
根据文件,这应该是可行的,但确实有抱怨。
: Failed to resolve table or column or scalar expression named 'names'如何正确地在SvcDisplayName列表中使用?
发布于 2022-03-15 12:29:12
除非选择要执行的全部代码,否则空行被视为查询之间的分隔符。
见下面的截图。
选择执行的全部代码.
=>有效查询

将光标放在查询上以执行.
在let 语句.之后没有空行。
=>有效查询

将光标放在查询上以执行.
在let 语句.之后有一个空行。
=>无效查询
请注意查询是如何标记为浅蓝色的,而不是let语句。

https://stackoverflow.com/questions/71480397
复制相似问题