Skip to content

Instantly share code, notes, and snippets.

@herculosh
Last active March 31, 2020 07:46
Show Gist options
  • Save herculosh/d0a9bc598f4e5786309bd7b980db39d3 to your computer and use it in GitHub Desktop.
Save herculosh/d0a9bc598f4e5786309bd7b980db39d3 to your computer and use it in GitHub Desktop.
conversion of a BrowserHistory.json file to CSV from Google - takedown
$columnUTCDateTime = @{name="Date Time UTC";e={[datetimeoffset]::FromUnixTimeMilliseconds($_.Time_usec/1000).UtcDateTime}}
$columnLocalDateTime = @{name="Date Time local";e={[datetimeoffset]::FromUnixTimeMilliseconds($_.Time_usec/1000).LocalDateTime}}
(Get-Content "BrowserHistory.json" -Encoding UTF8 | ConvertFrom-Json)."Browser History" | select title, $columnLocalDateTime, url, page_transition, client_id, time_usec, $columnUTCDateTime | Export-Csv "BrowserHistory.csv" -NoTypeInformation -Delimiter ";"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment