These cmdlets work:
Get-WmiObject Win32_PNPSignedDriver -Filter "DriverProviderName <> NULL"
Get-WmiObject Win32_PNPSignedDriver -Filter "DriverProviderName <> 'Microsoft'"
I can't seem to combine them with a OR statement & I don't know why:
Get-WmiObject Win32_PNPSignedDriver -Filter "DriverProviderName <> 'Microsoft' OR DriverProviderName <> NULL"
The command above runs, but doesn't exclude the NULL entries last one is Fax on my Win10 PC.
The answer to this similar question seems to imply I have it marked right, however theirs is matching to a string whereas I need to exclude a NULL object. I suspect it has to do with the NULL and/or lack of single quotes.
-Filterexpects a WQL “where” expression - tryIS NULL/IS NOT NULLper learn.microsoft.com/en-us/windows/win32/wmisdk/wql-operators-Filter "DriverProviderName <> 'Microsoft' and DriverProviderName IS NOT NULL"if you want to exclude the NULL entries… Note theANDconnective…-Filterdoes work with<>. @JosefZ comment was the solution usingANDinstead ofOR. If you put it as an answer I'll accept it.Get-CimInstance) superseded the WMI cmdlets (e.g.,Get-WmiObject) in PowerShell v3 (released in September 2012). Therefore, the WMI cmdlets should be avoided, not least because PowerShell [Core] (version 6 and above), where all future effort will go, doesn't even have them anymore. For more information, see this answer.