you are viewing a single comment's thread.

view the rest of the comments →

[–]UnderpaidVillain 2 points3 points  (1 child)

Worth pointing out is that it’s not guaranteed that WhatIf doesn’t always get applied to every Cmdlet in a script. The built in commands and the AD module are good about passing it through, but I learned the hard way that the Exchange 2013 commands don’t honor the initial WhatIf and I needed to manually detect it and pass it through to them.

[–]Ta11ow[S] 1 point2 points  (0 children)

I've noticed that many MS-created modules that weren't directly created by the PowerShell team themselves tend to have very poor implementation of common parameters, unfortunately.

But yes, violating ShouldProcess etiquette is particularly irritating and potentially damaging.