View Single Post
Old 09-19-2006   #2 (permalink)
Adam Milazzo


 
 

Re: How can I ensure that a variable is a built-in powershell variable?

Sung M Kim wrote:
> I have a question regarding variables.
> Is there a way to ensure that retrieved variable such as *Preference
> variables are indeed a built-in PowerShell variables?(they have "None"
> as an option for all)
>
> I was thinking about checking if a variable is of type
> "System.Management.Automation.ActionPreference" but can anyone just
> create a variable with *Preference as postfix and of type
> "System.Management.Automation.ActionPreference"?


Sure, anybody can, but why not let them?
My System SpecsSystem Spec