# Safety and Help

Safety and Help: \`-WhatIf\` in Your Own Tools, Help for Your Tool.

Updated: November 10, 2026

1. [\`-WhatIf\` in Your Own Tools](https://www.ask-codey.com/lessons/powershell-supports-should-process) (Freelancer): SupportsShouldProcess in \[CmdletBinding()\] gives a function -WhatIf and -Confirm, and wrapping each change in if ($PSCmdlet.ShouldProcess(target, action)) makes it print a What if: line instead of changing anything, or ask before each change, exactly like Remove-Item.
2. [Help for Your Tool](https://www.ask-codey.com/lessons/powershell-comment-based-help) (Journeyman): A comment block at the top of a function, with keywords such as .SYNOPSIS, .DESCRIPTION, .PARAMETER and .EXAMPLE, becomes the function's help page, so Get-Help, -Examples and -Parameter explain your tool the way they explain PowerShell's own commands.

Source: https://www.ask-codey.com/courses/powershell-in-depth/topics/powershell-safety-and-help
