How do I catch and handle Ctrl+C in a PowerShell script? I understand that I can do this from a cmdlet in v2 by including an override for the Pow
Pow
There is also a Stopping property on $PSCmdlet that can be used for this.
Stopping
$PSCmdlet