'Using Powershell to add URL to Chrome cookies

I am trying to find out if there is a way to add a URL to Chrome cookies tab under the "Sites that can always use cookies" in settings. I have tried to pull the Json preferences file to see if it could be added there but not seeing it. Wondering if anyone can point me in the right direction.

Here is what I have so far:

$LocalAppData = [Environment]::GetFolderPath( [Environment+SpecialFolder]::LocalApplicationData )
$ChromeDefaults = Join-Path $LocalAppData "Google\Chrome\User Data\default"
$ChromePrefFile = Join-Path $ChromeDefaults "Preferences"
$Settings = Get-Content $ChromePrefFile | ConvertFrom-Json >> C:\Temp\Test1.txt

But this is not giving me what I thought it would, and searching around it seems no one has asked about adding a URL to this section/list before using powershell.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source