wmi filter only works when negated twice


has ever saw before and/or know whats causing it?  when try run query filter of 10.1.% doesn't return anything.  when negate filter twice, getting data looking for?!?! 

ps c:\> gwmi -namespace root\microsoftdns microsoftdns_atype -filter "ipaddress '10.1.%'" | select ipaddress -first 10
ps c:\> gwmi -namespace root\microsoftdns microsoftdns_atype -filter "not not ipaddress '10.1.%'" | select ipaddress -first 10

ipaddress
---------
10.1.91.3
10.1.91.4
10.1.91.1
10.1.91.5
10.1.91.6
10.1.91.2
10.1.27.45
10.1.27.41
10.1.72.9
10.1.27.61


ps c:\>

i never liked -filter pipe

...| {$_.ipaddress -like "10.1.*"}



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Group Policy Event ID 1058 Error Code 1326 (The user name or password is incorrect)

Suspicious event log Event ID: 4905

DCOM received error "2147746132" from...