Try this:
Get-EventLog Security -Before ([DateTime]::Now) |
Where {$_.EventID -eq 4624} |
Group @{e={$_.TimeGenerated.Date}} |
Sort Count -desc
The Group-Object
command allows you to specify an expression for the property to group on. In this case you want to group on the date
part of the DateTime. Also note that it is unnecessary to quote arguments unless they contain space or special characters like ;
, @
, {
, $
and (
.