$sum = $NumberArray | Measure-Object -Maximum
$sum.Maximum
Use to get the maximum value of a number array
PS C:\> $NumberArray = 10,23,24,43,118,23,43 >> $sum = $NumberArray | Measure-Object -Maximum >> $sum.Maximum 118
$sum = $NumberArray | Measure-Object -Maximum
$sum.Maximum
DetailsPS C:\> $NumberArray = 10,23,24,43,118,23,43 >> $sum = $NumberArray | Measure-Object -Maximum >> $sum.Maximum 118