Home Dashboard Directory Help
Search

Mandatory parameter prompts should accept variable input by Trevor Sullivan


Status: 

Active


10
0
Sign in
to vote
Type: Suggestion
ID: 773554
Opened: 12/5/2012 8:12:40 AM
Access Restriction: Public
0
Workaround(s)
view

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).
Details
Sign in to post a comment.
Posted by Trevor Sullivan on 12/5/2012 at 8:23 AM
Update: Video attachment included on post, which demonstrates the code in the post.

Cheers,
Trevor Sullivan
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
ScreenCapture_12-5-2012 10.20.28 AM.wmv 12/5/2012 2.08 MB