whatif as default when not disable

I would like to know if it would be possible to write a powershell script that has the -WhatIf option enabled by default and the user should run -WhatIf:$false to definetively run the script.

I’m running [cmdletbinding(SupportsShouldProcess=$true, ConfirmImpact=’High’)] but I don’t know how to force whatif as default.

submitted by /u/zakozazz
[link] [comments]

Leave a Reply