Adding a Yes, No, Cancel prompt to a PowerShell script

The estimated reading time for this post is 0 minutes

When I write PowerShell scripts, I often want to step through sections. This allows me to decided whether to proceed with parts of my script or not. I achieve this by using the ChoiceDescription class as demonstrated below.

More information about using prompts in PowerShell can be found in the following article and tip on Microsoft TechNet.

Comments

Leave a Reply