Parameters and Prompts

When you want the best (or worst) of both worlds…

Words: 929

Time to read: ~ 5 minutes

TL;DR: Create a wrapper function that calls your properly constructed one. 🙂

Update: 21-Sep-2018 – u/Ta11ow and u/Lee_Dailey brought up two succinct points about using Read-Host as default parameters and the more appropriate method would be to create a “wrapper” function over the parameter function.
Also created a TL;DR.

Continue reading “Parameters and Prompts”

Change Read-Host to Confirm!

Words: 884

Time to read: ~ 4 minutes

Update: 29-Aug-2018 – Thanks to the good folks in reddit (u/TheIncorrigible1 & u/Ta11ow) who pointed out that Pause is a function, not an alias & a really cool addition to the confirm attribute. Also added the second step I left out of the 1st draft (oops).

Continue reading “Change Read-Host to Confirm!”