Hashtables

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.31.206