Functions/Math/Get-Average.ps1
Function Get-Average { [CmdletBinding()] Param ( # Input Values [Parameter(Mandatory=$true,ValueFromPipeline=$true)] $Values ) Begin {$ValueArray = [System.Collections.ArrayList]::new()} Process {$NULL = $ValueArray.Add($Values)} End {$ValueArray | Measure-Object -Average | Select -ExpandProperty Average} } |