
Description
Hi sir,
I've determined the script is not fully functional anymore with the latest version of Chrome regarding fetching the bookmarks. Google Chrome has set the bookmarks based on folders, subfolders, subfolders .children so you cannot fetch them all with your current method. To work around this I've created the following adjustment.
You off course are free to integrate it into your scripts, as it is of much help to me! Thanks in advance.
Adjusted code:
function Get-ChromeBookmarks { $Path = "$Env:systemdrive\Users\$UserName\AppData\Local\Google\Chrome\User Data\Default\Bookmarks" if (-not (Test-Path -Path $Path)) { Write-Verbose "[-] Could not find Chrome Bookmarks for username: $UserName" } else { $Json = Get-Content $Path $Output = $Json | ConvertFrom-Json $Jsonobject1 = $Output.roots.bookmark_bar.children $Jsonobject2 = $Output.roots.bookmark_bar.children.children $Jsonobject3 = $Output.roots.bookmark_bar.children.children.children $Jsonobject4 = $Output.roots.bookmark_bar.children.children.children.children $Jsonobject5 = $Output.roots.bookmark_bar.children.children.children.children.children $Jsonobject6 = $Output.roots.bookmark_bar.children.children.children.children.children.children $JsonObject = $Jsonobject1, $Jsonobject2, $Jsonobject3, $Jsonobject4, $Jsonobject5, $Jsonobject6 $JsonObject | ForEach-Object { New-Object -TypeName PSObject -Property @{ User = $UserName Browser = 'Chrome' DataType = 'Bookmark' Data = $_.item('url') Name = $_.item('name') } } $JsonObject } }
Happy to help out!
Kind regards,
Martijn