Execute a notification query

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

To execute a notification query

  1. Open the Windows Management Instrumentation Tester dialog box.

  2. In the Windows Management Instrumentation (WMI) Tester dialog box, click Connect.

  3. In the Namespace box, type the path to the namespace that you want to connect to.

    Example?

    • To connect to the namespace where the Win32 provider classes reside, type:

      root\cimv2

  4. Click Connect.

  5. Click Notification Query.

  6. In the Enter Query box, type an event notification query.

    Example?

    • An event query that notifies you when a log event occurs:

      SELECT * FROM __instancecreationevent WHERE TargetInstance ISA 'Win32_NTLogEvent' AND (TargetInstance.LogFile="Application" OR TargetInstance.LogFile="System")

  7. Click Apply.

    • The text Operation in Progress appear in the lower-right corner of the Query Result dialog box, indicating that WMI is processing your query. Because event notification queries are never complete, the Operation in Progress status message is displayed on the Query Result dialog box until you stop the query.

    • For event notification queries that are running semisynchronously, you must specify batch count and time-out values. These values determine how events are extracted from the enumerator.

    • If your event notification query is running asynchronously, events are displayed in the Query Result dialog box as the events are received.

    • If you want to view an event notification, double-click the event in the Query Result dialog box. The Instance Of dialog box appears.

    • To stop the query, click Close .

Notes

  • Performing this task on the local computer does not require you to have administrative credentials. Therefore, as a security best practice, consider performing this task as a user without administrative credentials.

  • Performing this task on a remote computer requires that you are a member of the Administrators group on the remote computer, or that you have been delegated the appropriate authority.

  • To open the Windows Management Instrumentation Tester dialog box, click Start, click Run, and then type WBEMTest.exe.

  • If you want your event notification query to run asynchronously, select the Execute asynchronously check box on the Windows Management Instrumentation Tester dialog box.

  • You can query for event notifications with Notification Query on the Windows Management Instrumentation Tester dialog box.

Information about functional differences

  • Your server might function differently based on the version and edition of the operating system that is installed, your account permissions, and your menu settings. For more information, see Viewing Help on the Web.

See Also

Concepts

Query dialog box
Query Result dialog box