Currently DNS Filter Uninstall is using the MSI method but we have seen it fail and the service is still running which means its still checking into the portal.
I have been using this for the Non WhiteLabel Version:
wmic product where name=“DNSFilter Agent” call uninstall
This for the Whitelabel Version:
wmic product where name=“DNS Agent” call uninstall
I would also do a service check and confirm if DNS Agent or DNSFilter Agent service are still running if so I run:
sc stop “DNSFilter Agent”
sc delete “DNSFilter Agent”
sc stop “DNS Agent”
sc delete “DNS Agent”
Can you guys add this method to the uninstall process so we can fully remove DNS Filter.
I recommend not using the “product” wmi class. It causes a consistency check against all software, and if it finds anything reporting even the tiniest error it will perform a repair install on that program without warning. This occurs even for queries. The Microsoft documentation has this issue mentioned in detail on the Win32_Product documentation.
Alternatively, I would suggest finding and running the uninstall string manually from the registry, which isn’t too hard.
64-Bit apps can be found in:
“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall”
and 32-Bit apps can be found in:
“HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall”
Just look in each key until you find a display name value that matches your software. The uninstall string will be in the same key.
ImmyBot even has some functions that kind of automate this:
Uninstall-Software or Uninstall-MSI