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

Status : 


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


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.

Trevor Sullivan