美文网首页
SELECT * FROM __InstanceModifica

SELECT * FROM __InstanceModifica

作者: 墨夕晨 | 来源:发表于2022-08-26 14:00 被阅读0次

    只需创建.vbs
    代码如下:

    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
    

    管理员身份运行cmd,cmd中执行该.vbs

    相关文章

      网友评论

          本文标题:SELECT * FROM __InstanceModifica

          本文链接:https://www.haomeiwen.com/subject/yabtnrtx.html