From fcc67f686e5e656b680f691865bf203b9fdfb834 Mon Sep 17 00:00:00 2001 From: zoicware <118035521+zoicware@users.noreply.github.com> Date: Tue, 16 Dec 2025 16:06:30 -0500 Subject: [PATCH] add revert edge flags --- RemoveWindowsAi.ps1 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/RemoveWindowsAi.ps1 b/RemoveWindowsAi.ps1 index dcd0029..1cb88b6 100644 --- a/RemoveWindowsAi.ps1 +++ b/RemoveWindowsAi.ps1 @@ -283,9 +283,14 @@ function Disable-Registry-Keys { 'edge-ntp-composer@2', #disables the copilot search in new tab page 'edge-compose@2' #disables the ai writing help ) - foreach ($flag in $flags) { - if ($jsonContent.browser.enabled_labs_experiments -notcontains $flag) { - $jsonContent.browser.enabled_labs_experiments += $flag + if ($revert) { + $jsonContent.browser.enabled_labs_experiments = $jsonContent.browser.enabled_labs_experiments | Where-Object { $_ -notin $flags } + } + else { + foreach ($flag in $flags) { + if ($jsonContent.browser.enabled_labs_experiments -notcontains $flag) { + $jsonContent.browser.enabled_labs_experiments += $flag + } } }