Try the following:
Get-EventLog Security -Before ([DateTime]::Now) |
Where {$_.EventID -eq 4624} |
Group @{e={$_.TimeGenerated.Date}} |
Sort Count -desc
The command Group-Objectallows you to specify an expression to group the object. In this case, you want to group the part datein a DateTime. Also note that there is no need to argue, if they do not contain spaces or special characters, such as ;, @, {, $and (.
source
share