Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rustyvz/3d86b53756ad5ada7720d0afc5d23da1 to your computer and use it in GitHub Desktop.
Save rustyvz/3d86b53756ad5ada7720d0afc5d23da1 to your computer and use it in GitHub Desktop.
$registryPath = "HKLM:\Software\Policies\Google\Chrome\DownloadInsecureContentAllowedForUrls"
$valueName = "1"
$urls = "http://production.goldenvalleynatural.com;http://training.goldenvalleynatural.com;http://deacom.goldenvalleynatural.com"
# Ensure the registry path exists
if (-not (Test-Path $registryPath)) {
New-Item -Path $registryPath -Force | Out-Null
}
# Set or update the registry value
Set-ItemProperty -Path $registryPath -Name $valueName -Value $urls -Type String
Write-Output "Registry key for insecure downloads updated successfully."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment