Summary: Learn how to identify automatic variables.
How many types of automatic variables exist by default? And how would you discover such a thing?
There are five types of automatic variables that exist by default.
To discover them, use the variable provider and the Get-Member cmdlet:
PS C:\> dir variable: -Force | gm | select typename | sort typename -Unique
TypeName
--------
System.Management.Automation.LocalVariable
System.Management.Automation.NullVariable
System.Management.Automation.PSVariable
System.Management.Automation.QuestionMarkVariable
System.Management.Automation.SessionStateCapacityVariable