Skip to content

Merge HashTables

apobekiaris edited this page Sep 4, 2020 · 3 revisions

external help file: XpandPwsh-help.xml Module Name: XpandPwsh online version: schema: 2.0.0

Merge-HashTables

SYNOPSIS

Merge HashTables.

SYNTAX

Merge-HashTables [[-Operator] <ScriptBlock>] [<CommonParameters>]

DESCRIPTION

Merge HashTables.

EXAMPLES

Example 1

PS C:\> $h1, $h2, $h3 | Merge-Hashtables {($_ | Measure-Object -Average).Average} 

Name                           Value
----                           -----
e                              1
d                              3
b                              7
c                              5
a                              9

Take the average values of three hastables.

Example 2

PS C:\> $h1, $h2, $h3 | Merge-Hashtables {$_ -Join ""} 

Name                           Value
----                           -----
e                              1
d                              42
b                              86
c                              753
a                              9

Join the values together

Example 3

PS C:\> $h1, $h2, $h3 | Merge-Hashtables {$_ | Sort-Object} 

Name                           Value
----                           -----
e                              1
d                              {2, 4}
b                              {6, 8}
c                              {3, 5, 7}
a                              9

Sort the values list

PARAMETERS

-Operator

{{ Fill Operator Description }}

Type: ScriptBlock
Parameter Sets: (All)
Aliases:

Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

System.Object

NOTES

RELATED LINKS

image

image


Star the project if you think it deserves it.

GitHub stars

Fork the project to extend and contribute.

GitHub forks

Clone this wiki locally