I`m trying to create a script that will retrieve all my browser history, the problem is that I cant make it work with the exact link and the date-time that the website was visited.
Can anyone help me here?
I have already tried this page, but still can`t get Date-Time/ complete link information.
Export Chrome History with Powershell
function Get-ChromeHistory {
$Path = "$Env:systemdrive\Users\$UserName\AppData\Local\Google\Chrome\User Data\Default\History"
if (-not (Test-Path -Path $Path)) {
Write-Verbose "[!] Could not find Chrome History for username: $UserName"
}
$Regex = '(htt(p|s))://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)*?'
$Value = Get-Content -Path "$Env:systemdrive\Users\$UserName\AppData\Local\Google\Chrome\User Data\Default\History"|Select-String -AllMatches $regex |% {($_.Matches).Value} |Sort -Unique
$Value | ForEach-Object {
$Key = $_
if ($Key -match $Search){
New-Object -TypeName PSObject -Property @{
User = $UserName
Browser = 'Chrome'
DataType = 'History'
Data = $_
}
}
}
}
Actual result:
Chrome | myusername | https://www.stackoverflow.com/
Expected result:
Chrome | username | 06/21/2019 11:05 | https://stackoverflow.com/questions/ask