platyPS icon indicating copy to clipboard operation
platyPS copied to clipboard

Support for -WhatIf

Open jdhitsolutions opened this issue 8 years ago • 2 comments

Because many of the commands in this module are changing state, shouldn't they support -WhatIf? Personally, I find this very important when creating external help to make sure I haven't made a mistake anywhere.

jdhitsolutions avatar Jul 11 '16 14:07 jdhitsolutions

Yes, always good to have -WhatIf. :)

At the same time, the recommended workflow is to version-control module and a documentation (together). When you do it, you don't really need -WhatIf, because you can always checkout previous state. More then that, you get much better understanding of "What changed", once you apply the change.

For example, there could be bugs in Update-MarkdownHelp logging logic (i.e. #165). But, if you version control the doc, you will get a reliable info from the diff, without the log.

vors avatar Jul 11 '16 15:07 vors

I understand all of that. I am trying to maintain consistency, especially for IT Pros using PowerShell. I get discouraged when I train and explain -Whatif, only to discover commands that ignore the paradigm. Yes, version control is ideal but that shouldn't replace the fundamental nature of how people use PowerShell commands, or at least expect them to behave.

jdhitsolutions avatar Jul 11 '16 15:07 jdhitsolutions

This is implemented in Microsoft.PowerShell.PlatyPS v1.

sdwheeler avatar May 28 '24 15:05 sdwheeler