Permissions required to run: ExecNotificationQueryAsync RRS feed

  • Question

  • I was directed to this section via:

    This is a VBScript program that is failing to run an an unprivileged user via Task Scheduler. I'm trying to get the following bit of code to work on a Windows Server 2016 Domain Controller:

    Set objWMIServiceRoot = GetObject("WinMgmts:\\.\root\cimv2")
    Set objSink = WScript.CreateObject("WbemScripting.SWbemSink","objSink_")
    	objWMIServiceRoot.ExecNotificationQueryAsync objSink, "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_Process'"

    It fails at:


    With the error:
    Invalid parameter

    This works fine when I run the task as an administrator but I do not want the program to have administrative rights.

    Any suggestions?

    Thursday, November 9, 2017 2:05 PM

All replies