February 2019
Intermediate to advanced
626 pages
15h 51m
English
A hashtable is an associative array or an indexed array. Individual elements in the array are created with a unique key. Keys cannot be duplicated within the hashtable.
Hashtables are important in PowerShell. They are used to create custom objects, to pass parameters into commands, to create custom properties using the Select object, and as the type for values assigned to parameter values of many different commands, among other things.
For finding commands that use Hashtable as a parameter, we use the following:
Get-Command -ParameterType Hashtable
This topic explores creating hashtables, selecting elements, enumerating all values in a hashtable, and adding and removing elements.
Read now
Unlock full access