Skip to content

Instantly share code, notes, and snippets.

@LinkPhoenix
Created October 19, 2025 23:52
Show Gist options
  • Select an option

  • Save LinkPhoenix/e9e7afc5e4fb2df9dce2610674cb1501 to your computer and use it in GitHub Desktop.

Select an option

Save LinkPhoenix/e9e7afc5e4fb2df9dce2610674cb1501 to your computer and use it in GitHub Desktop.
PowerShell Brave Debloat Script – Disable Rewards, Wallet, VPN & Leo AI
<#
.SYNOPSIS
Manage Brave browser features individually by toggling Brave Rewards, Wallet, VPN, and Leo AI registry settings.
.DESCRIPTION
This interactive script checks the current registry state of each Brave feature.
It prompts the user for each feature to decide whether to disable it, remove the policy, or skip to next.
Status is displayed in color-coded messages for clarity.
.PARAMETER None
Interactive prompts guide all choices.
.EXAMPLE
.\Debloat-Brave.ps1
Runs checks and prompts for each Brave feature, applying changes accordingly.
.NOTES
Created: 2025-10-20
Version: 1.2
#>
function Write-Log {
param (
[Parameter(Mandatory = $true)][string]$Message,
[Parameter()][ValidateSet('Black','DarkBlue','DarkGreen','DarkCyan','DarkRed','DarkMagenta','DarkYellow','Gray','DarkGray','Blue','Green','Cyan','Red','Magenta','Yellow','White')]
[string]$Color = 'White'
)
Write-Host $Message -ForegroundColor $Color
}
# Header
Write-Log "`n=======================================" Cyan
Write-Log " Brave Debloat Script " Cyan
Write-Log "=======================================`n" Cyan
$baseKey = "HKLM:\SOFTWARE\Policies\BraveSoftware\Brave"
$features = @{
"BraveRewardsDisabled" = "Brave Rewards"
"BraveWalletDisabled" = "Brave Wallet"
"BraveVPNDisabled" = "Brave VPN"
"BraveAIChatEnabled" = "Leo AI"
}
if (-not (Test-Path $baseKey)) {
New-Item -Path "HKLM:\SOFTWARE\Policies\BraveSoftware" -Name "Brave" -Force | Out-Null
}
function Read-Choice {
param([string]$Prompt)
Write-Host $Prompt
Write-Host "(y = disable, n = do not disable and remove key, s = skip) [Y/n/s]" -NoNewline
do {
$answer = Read-Host " "
if ([string]::IsNullOrWhiteSpace($answer)) { $answer = 'y' }
$answer = $answer.ToLower()
} while ($answer -notin @('y','yes','n','no','s','skip'))
return $answer
}
foreach ($key in $features.Keys) {
try {
$val = Get-ItemPropertyValue -Path $baseKey -Name $key -ErrorAction Stop
if ($key -eq "BraveAIChatEnabled") {
$statusText = if ($val -eq 1) { "Enabled" } else { "Disabled" }
$statusColor = if ($val -eq 1) { "Green" } else { "Red" }
} else {
$statusText = if ($val -eq 1) { "Disabled" } else { "Enabled" }
$statusColor = if ($val -eq 1) { "Red" } else { "Green" }
}
} catch {
$statusText = "Not Configured"
$statusColor = "Yellow"
$val = $null
}
Write-Log "$($features[$key]) status: $statusText" $statusColor
$choice = Read-Choice "Do you want to disable $($features[$key])?"
switch ($choice) {
'y' {
Set-ItemProperty -Path $baseKey -Name $key -Value 1 -Type DWord
Write-Log "$($features[$key]) disabled." Green
}
'n' {
if ($val -ne $null) {
Remove-ItemProperty -Path $baseKey -Name $key -ErrorAction SilentlyContinue
Write-Log "$($features[$key]) registry key removed." Cyan
}
else {
Write-Log "$($features[$key]) was not configured, nothing to remove." Yellow
}
}
's' {
Write-Log "Skipped $($features[$key])." Gray
}
}
}
Write-Log "`nCurrent Brave features status after changes:" Cyan
foreach ($key in $features.Keys) {
try {
$val = Get-ItemPropertyValue -Path $baseKey -Name $key -ErrorAction Stop
if ($key -eq "BraveAIChatEnabled") {
$statusText = if ($val -eq 1) { "Enabled" } else { "Disabled" }
$statusColor = if ($val -eq 1) { "Green" } else { "Red" }
} else {
$statusText = if ($val -eq 1) { "Disabled" } else { "Enabled" }
$statusColor = if ($val -eq 1) { "Red" } else { "Green" }
}
} catch {
$statusText = "Not Configured"
$statusColor = "Yellow"
}
Write-Log "$($features[$key]) status: $statusText" $statusColor
}
Write-Log "`nBrave features management completed." Cyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment