O'Reilly logo

Windows PowerShell Cookbook, 3rd Edition by Lee Holmes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix I. Selected Events and Their Uses

PowerShell’s eventing commands give you access to events from the .NET Framework, as well as events surfaced by Windows Management Instrumentation (WMI). Table I-1 lists a selection of .NET events. Table I-2 lists a selection of WMI events.

Table I-1. Selected .NET events

Type

Event

Description

System.AppDomain

AssemblyLoad

Occurs when an assembly is loaded.

System.AppDomain

TypeResolve

Occurs when the resolution of a type fails.

System.AppDomain

ResourceResolve

Occurs when the resolution of a resource fails because the resource is not a valid linked or embedded resource in the assembly.

System.AppDomain

AssemblyResolve

Occurs when the resolution of an assembly fails.

System.AppDomain

ReflectionOnlyAssemblyResolve

Occurs when the resolution of an assembly fails in the reflection-only context.

System.AppDomain

UnhandledException

Occurs when an exception is not caught.

System.Console

CancelKeyPress

Occurs when the Control modifier key (Ctrl) and C console key (C) are pressed simultaneously (Ctrl-C).

Microsoft.Win32.SystemEvents

DisplaySettingsChanging

Occurs when the display settings are changing.

Microsoft.Win32.SystemEvents

DisplaySettingsChanged

Occurs when the user changes the display settings.

Microsoft.Win32.SystemEvents

InstalledFontsChanged

Occurs when the user adds fonts to or removes fonts from the system.

Microsoft.Win32.SystemEvents

LowMemory

Occurs when the system is running out of available RAM.

Microsoft.Win32.SystemEvents ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required