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

DCOM received error "2147746132" from...

ADFS 3.0 Event ID 4625 | An Error occurred During Logon | Status: 0xC000035B

DFSR RPC replication errors 5014 1726 with large files over VPN