Summary

This chapter presented a discussion of the WMI event model, a system for detecting happenings in a WMI-managed world as and when they occur. It opened with a demonstration of synchronous event delivery, a mechanism that allows a script to connect to the WMI service of a machine, register an interest in receiving notification of certain happenings, and then sit silently until a happening of the relevant type occurs. This was followed by a consideration of asynchronous event notification, a more sophisticated mechanism that allows a single script to respond to several different types of event, perhaps even emanating from several different computers, and to take appropriate action as each event is delivered. The final section of the chapter ...

Get Windows Management Instrumentation (WMI) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.