Open
Description
In #51, we look at permanent WMI eventing. In this old Scripting Guy post, the author looks at temporary eventing.
The scenario is you want to know when services change state.
- Link to the post in the old blog: https://devblogs.microsoft.com/scripting/how-can-i-be-notified-any-time-a-service-goes-down/
- Description of what needs to be changed: needs to be converted to use the CIM Cmdlets and with using PowerShell event handling.