The Before and After parameters accept DateTime values, not String values like you are trying to pass in.
$data = @()
$culture = New-Object System.Globalization.CultureInfo -ArgumentList "en-US"
$before = [DateTime]::Parse('07-31-2010 01:00:00', $culture)
$after = [DateTime]::Parse('08-02-2010 01:00:00', $culture)
Get-EventLog -LogName Security -InstanceId 4624 -After $after -Before $before | Select-Object -Property TimeGenerated, ReplacementStrings | ForEach-Object {
$data += New-Object PSObject -Property @{
ComputerName = $env:ComputerName
TimeGenerated = $_.TimeGenerated
SecurityId = $_.ReplacementStrings[6] + "\" + $_.ReplacementStrings[5]
}
}
$data