Home Dashboard Directory Help
Search

Default TabExpansion does not quote values in ValidateSet by Stephen Mills


Status: 

Active


6
1
Sign in
to vote
Type: Bug
ID: 779691
Opened: 2/21/2013 5:22:42 AM
Access Restriction: Public
1
Workaround(s)
view
1
User(s) can reproduce this bug

Description

The default Tab Expansion in PowerShell V3 doesn't properly quote items in ValidateSet of a parameter if the items have spaces in them.
Details
Sign in to post a comment.
Sign in to post a workaround.
Posted by Bailey84j on 6/9/2014 at 4:51 AM
add underscores in the validateset and use -replace '_',' ' to replace the underscores with spaces
newvar = validatesetvar -replace '_',' '

it much be a new variable