Mandatory parameter prompts should accept variable input - by Trevor Sullivan [MVP]

Status : 

 


10
0
Sign in
to vote
ID 773554 Comments
Status Active Workarounds
Type Suggestion Repros 0
Opened 12/5/2012 8:12:40 AM
Access Restriction Public

Description

Note: See attachment to this ticket for a video demonstration of the issue.

When writing a PowerShell function, script, or ScriptBlock that accepts named parameters, it is sometimes desirable to have the end user prompted for input. PowerShell input prompts work great for strings and integers, but fails with other data types (eg. bool, object).
Sign in to post a comment.
Posted by Trevor Sullivan [MVP] on 12/5/2012 at 8:23 AM
Update: Video attachment included on post, which demonstrates the code in the post.

Cheers,
Trevor Sullivan