View Single Post
Old 04-11-2008   #2 (permalink)
Marco Shaw [MVP]
Guest
 
Posts: n/a

Re: Confusing prompt for a [bool] value (V2 CTP)

Quote:

> The question:
> Is this by design, a bug or am I missing something?
>
I've never seen anyone try using [bool]. What are you trying to
accomplish exactly? I discussed this with Don Jones, and he indicated
perhaps you should be using [switch] if your goal is to determine
whether a parameter is set or not, instead of trying to do something like:
cmdlet -parameter true <--bool which you're trying
Just do
cmdlet -parameter <--[switch]

Marco

--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp

PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com