Hi,
What is the best method for grupping the result of get-stat by a custom date value. For exampla, how can use a 2 hours grupping interval in the next code?
....| Group-Object -Property {$_.Timestamp.hour},{$_.Entity.Name} |...
Thanks
I would do something like this
Group-Object -Property {[int]($_.Timestamp.Hour/2)}
But note that if your metrics span over more than 1 day, this will place metrics from different days, but from the same 2-hour interval, in the same group.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I would do something like this
Group-Object -Property {[int]($_.Timestamp.Hour/2)}
But note that if your metrics span over more than 1 day, this will place metrics from different days, but from the same 2-hour interval, in the same group.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank Luc for your help!
Simple and grate solution!
Zoli