Dumping Edge Cookies

by Jan 27, 2023

If you’d like to find out (or document) the website cookies stored by the Edge browser, PowerShell can dump that information for you. The cookie list is actually contained in a SQLite Database and found in the table “Cookies”.

By installing the free “ReallySimpleDatabase” module from PowerShellGallery.com, it’s a snap to connect to and read the database:

#requires -Modules ReallySimpleDatabase

<#
make sure you install the required module before you run this script:
Install-Module -Name ReallySimpleDatabase -Scope CurrentUser
#>

$path = "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Network\Cookies"

$db = Get-Database -Path $PATH

$db.InvokeSql('select * from cookies') | 
    Select-Object host_key, name

Tweet this Tip! Tweet this Tip!