Events in .NET occur when something of interest happens to an object. For instance, System.IO.FileSystemWatcher can be used to monitor a filesystem for changes; when something changes, an event will be raised.
Many different types of objects raise events when changes occur. Get-Member can be used to explore an instance of an object for Event members. For example, a Process object returned by the Get-Process command includes a number of events, shown as follows:
PS> Get-Process | Get-Member -MemberType Event
TypeName: System.Diagnostics.Process
Name MemberType Definition
---- ---------- ----------
Disposed Event System.EventHandler Disposed(System.Object, System.EventArgs)
ErrorDataReceived Event System.Diagnostics.DataReceivedEventHandler ErrorDataReceived(S...
Exited Event ...