Just to make this code even more complicated, I want to get values from Mon - Fri between 5.30 - 17.30, on these week days. The code I got from your previous post was :
$businessDays = "Monday","Tuesday","Wednesday","Thursday","Friday"
$dayStart = New-Object DateTime(1,1,1,7,30,0)
$dayEnd = New-Object DateTime(1,1,1,17,30,0)
and then the where statement: Where-object {$businessDays -contains $_.Timestamp.DayOfWeek -and $_.timestamp.timeofday -gt $daystart.timeofday -and $_.timestamp.timeofday -lt $dayend.timeofday}
Would I place this code after the get-stat statement or after the multiplication code. Would this have any affect on the Math Round code. I placed it after the get-stat, after a | but then got no value for cpu ready.
Any advice.