[CmdletBinding()]

By adding this to the top of our function we unlock a whole host of useful things. For starters we now have access to Write-Verbose which should take the place of Write-Host in any function that doesn’t use the “Show” or the “Format” verb.

It also let’s you add “should process” support which allows you to prompt the user before taking an action. I add this to any write actions to confirm with the caller that they actually mean to take the action as an extra safety net. It also adds the -WhatIf function that can be super helpful for Pester. By returning the splat in the -WhatIf you can validate that the request is being built as expected. More on proper layering of should process functions coming soon.