Thank you for this, bet you're dealing with Webroot SecureAnywhere
delete antivirusproduct instance using wmi
Good day.
I hope you are keeping well.
I'm a complete noob when it comes to powershell scripting and am still learning.
I am able to delete the instance manually using wbemtest but I'm struggling to put that into powershell.
Attached is a screenshot of wbemtest where i am able to delete the instance.
Here is where i am with powershell: Remove-WmiObject -Namespace root/securitycenter2 -class AntivirusProduct.instanceGuid="{Antivirus key}"
The above command does not work.
Please note below command can be harmfull:
Remove-WmiObject -Namespace root/securitycenter2 -class AntivirusProduct
The above command deleted the entire Antivirusproduct class. I only need to delete an instance/key in antivirusproduct.
The reason for the powershell script is that an antivirusproduct is stuck in security center and is causing the new antivirusproduct to snooze/not run because the primary antivirus is still set to the old antivirus. We need to run the command on 750 computers and I prefer not to do it manually with wbemtest.
Please let me know if you need more information or if you know where i might get an answer.
Thank you in advance
2 answers
Sort by: Newest
-
-
Jacques Scheepers 1 Reputation point
2022-03-24T14:08:42.267+00:00 After clicking on the instance in wbemtest i found the path of the product
Solution:
Remove-WmiObject -path \localhost\ROOT\securitycenter2:AntivirusProduct.instanceGuid="{product key}"