为什么这可以作为WQL查询?

时间:2015-10-08 22:06:37

标签: wmi wql

我正在编写一个Powershell脚本,并且正在查询本地DNS资源,以查找符合特定条件的CNAME和A记录(特别是针对HP服务器)。使用WQL对root \ MicrosoftDNS提供程序使用完全管理员访问权限,我获得了以下0条记录:

select * from MicrosoftDNS_ResourceRecord where TextRepresentation like '%sql%'

然而,否定否定是有效的。

select * from MicrosoftDNS_ResourceRecord where NOT(NOT(TextRepresentation like '%sql%'))

为什么呢?我疯了吗?

完整查询是:

select * from MicrosoftDNS_ResourceRecord where NOT (ContainerName like '..%' OR OwnerName like '%ilo%') AND (__CLASS = 'MicrosoftDNS_AType' OR __CLASS = 'MicrosoftDNS_CNAMEType') AND NOT(NOT(TextRepresentation like '%sql%'))

0 个答案:

没有答案