Values
Values: Variables: `$name`, Text: Quotes and `$( )`, Numbers, Dates and Types, Lists and Lookups: Arrays and Hashtables.
Updated
- Variables: `$name` (Apprentice): A variable is a name PowerShell keeps a value under, so $owl = "…" stores a long path once, $drawings = Get-ChildItem … keeps a whole list of files, and $owl hands the value back in any later command until you close the window.
- Text: Quotes and `$( )` (Apprentice): Double quotes fill in the values of variables and single quotes keep text exactly as typed, $( ) puts a property or a whole command's answer into text, and a here-string holds text of many lines.
- Numbers, Dates and Types (Apprentice): Every value in PowerShell has a type, such as a whole number, text or a date; [int], [decimal] and [datetime] turn text into the type you need, and subtracting dates, AddDays and Get-Date -Format answer questions such as how many days are left until a trip.
- Lists and Lookups: Arrays and Hashtables (Journeyman): An array keeps several values in order, made with commas or @( ) and read by position from [0], and a hashtable, made with @{ }, keeps values under names so you can look one up by its name, the way you'd find a word in a dictionary.