A cmdlet that modifies the system should call ShouldProcess to request confirmation. In special cases it also calls ShouldContinue. Call ShouldContinue only after ShouldProcess.
Set the SupportsShouldProcess keyword on the Cmdlet attribute. If the attribute claims support but the cmdlet never calls ShouldProcess, the user can modify the system unexpectedly.
ShouldProcessCovers any system modification. It is controlled by a user preference and the WhatIf parameter.
ShouldContinueAn additional check for potentially dangerous modifications. It is not controlled by any user preference or by WhatIf.
A cmdlet that calls ShouldContinue should expose a Force parameter that bypasses both calls and proceeds. This lets the cmdlet run in non-interactive scripts and hosts.
Stop-Process calls ShouldContinue before stopping critical processes such as System, Winlogon, and Spoolsv.