Thread: Set-Variable
View Single Post
Old 10-25-2006   #1 (permalink)
Fred J.


 
 

Set-Variable

PS> Set-Variable -name xy -value "orange"
PS> Set-Variable -name xy -description "this variable contains a color"
PS> Get-Variable -name xy
Name Value
---- -----
xy orange

PS> Get-Variable -name xy |format-list -property *
Name : xy
Description : this variable contains a color
Value : orange
Options : None
Attributes : {}

PS> get-variable xy | format-list -property description
Description : this variable contains a color

Why isn't a value returned when I do this? All I get is a prompt.
PS > $xy.description
PS >
Fred Jacobowitz

My System SpecsSystem Spec