End of Week
$date.Date.AddDays(7-($date).DayOfWeek.value__).AddMilliseconds(-1)
End Of Year
(Get-Date $date.Date -day 1 -Month 1).AddYears(1).AddMilliseconds(-1)
Minimum value from list of numbers
$sum = $NumberArray | Measure-Object -Minimum $sum.Minimum
Maximun value from list of numbers
$sum = $NumberArray | Measure-Object -Maximum $sum.Maximum