< Back

Search-HashTable

Sat Jan 11, 2020 2:46 pm

NAME Search-HashTable



SYNOPSIS

This function performs a search of a hash table using a provided key.





SYNTAX

Search-HashTable [-hashTable] <Hashtable> [-key] <String> [-caseSensitive] [<CommonParameters>]





DESCRIPTION

This function performs a search of a hash table using a provided key.

It returns the value matching the key if found, and null otherwise.

The case sensitive search has O(1) time complexity while the case insensitive search has

O(N) time complexity, where N is the number of key-value pairs in the hash table.





PARAMETERS

-hashTable <Hashtable>

The hash table



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-key <String>

The key used to lookup the value in the hash table



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-caseSensitive [<SwitchParameter>]

Select if the search should be case sensitive.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS





RELATED LINKS