← Docs home

Override an Input Processing Method

📐 Rule.

To participate in the PowerShell environment, a cmdlet must override at least one of the input processing methods on System.Management.Automation.Cmdlet.

BeginProcessing

Called one time. Pre-processing functionality.

ProcessRecord

Called multiple times. Record-by-record functionality.

EndProcessing

Called one time. Post-processing functionality.

Why.

These methods are where the cmdlet's work runs. A cmdlet that overrides none does nothing when invoked in the pipeline.