~/talk

Advanced PowerShell Eventing Scripting Techniques

links:none on file
slides:none on file

Claims that PowerShell lacks a full scripting environment inside event handler scriptblocks and offers concrete workarounds: uses WMI intrinsic/extrinsic events, Win32_ModuleTrace logging to capture DLL loads (writes to file/event log), timers and engine idle events, delegates like ServerCertificateValidationCallback override to accept bad certs, and async/unmanaged callbacks to emulate a simple web server. Explains a reflection-only assembly resolve hack that sets a nonpublic field to attach a handler. Demonstrations work but require hacks: globals, files, or wrapper Register/Get/Unregister commands to persist or retrieve objects.

AI-written summary · about

  1. 0:00Start
  2. 2:33Types of Events Intrinsic and Extrinsic Events an Intrinsic Event
  3. 4:55Instance Creation Event
  4. 6:47Engine Events
  5. 7:59Register Object Event
  6. 13:18Event Handler
  7. 16:44Module Auditing
  8. 20:07Delegates
  9. 22:33Unmanaged Callbacks
  10. 23:20Dotnet Asynchronous Callbacks
  11. 29:48Limitations
  12. 36:26Global Variables
  13. 38:24Unregister Event
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.