解决 ”Event filter with query "SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstan“...


今天查看电脑日志时发现日志中有一个错误级别的日志,详情如下:

Event filter with query “SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA “Win32_Processor” AND TargetInstance.LoadPercentage > 99” could not be reactivated in namespace “//./root/CIMV2” because of error 0x80041003. Events cannot be delivered through this filter until the problem is corrected.

现给出解决方案: 
1. 建立一个名字为Workaround.txt的文档 
2. 把下面的内容复制到刚建立的文档中

strComputer = "."

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\subscription")

Set obj1 = objWMIService.ExecQuery("select * from __eventfilter where name='BVTFilter' and query='SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA ""Win32_Processor"" AND TargetInstance.LoadPercentage > 99'")

For Each obj1elem in obj1

set obj2set = obj1elem.Associators_("__FilterToConsumerBinding")

set obj3set = obj1elem.References_("__FilterToConsumerBinding")

For each obj2 in obj2set

WScript.echo "Deleting the object"

WScript.echo obj2.GetObjectText_

obj2.Delete_

next

For each obj3 in obj3set

WScript.echo "Deleting the object"

WScript.echo obj3.GetObjectText_

obj3.Delete_

next

WScript.echo "Deleting the object"

WScript.echo obj1elem.GetObjectText_

obj1elem.Delete_

Next


3.将文档保存为Workaround.vbs 
4.以管理员权限运行命令行,然后执行命令 cscript Workaround.vbs

PS:提示,记得要找到指定路径~~

其实这条日志可以被忽略…… 
参考地址:

https://support.microsoft.com/en-us/help/2545227/event-id-10-is-logged-in-the-application-log-after-you-install-service

转载于:https://my.oschina.net/asktao/blog/3101754

你可能感兴趣的:(解决 ”Event filter with query "SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstan“...)