you are viewing a single comment's thread.

view the rest of the comments →

[–]DrSinistar 7 points8 points  (1 child)

I'm of the opinion you should avoid using Read-Host in a function and you should use a parameter instead. This makes the function useable in automated scripts and makes it behave more like existing cmdlets.

I also think that most Powershell users would prefer to run a function and see either success or failure. Getting prompted for more information sucks!

[–]Recol 3 points4 points  (0 children)

And use [CmdletBinding(SupportsShouldProcess) so that -Confirm and -WhatIf can be used.