From 3bae0057eac3741d98d6e8b53eff183ed31cc117 Mon Sep 17 00:00:00 2001 From: NexusOne23 Date: Fri, 27 Feb 2026 11:29:42 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20SetMaximumStorageSpaceForRecallSnapshots?= =?UTF-8?q?=20value=2010=20=E2=86=92=2010240=20(MB)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Microsoft CSP stores Recall snapshot storage in MB, not GB. 10 GB = 10240 MB. Fixes apply, verify, and compliance check. Closes #14 Co-Authored-By: Claude Opus 4.6 --- Docs/FEATURES.md | 2 +- Modules/AntiAI/Config/AntiAI-Settings.json | 4 ++-- Modules/AntiAI/Private/Set-RecallProtection.ps1 | 10 +++++----- Modules/AntiAI/Private/Test-AntiAICompliance.ps1 | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Docs/FEATURES.md b/Docs/FEATURES.md index 4065224..7f56abf 100644 --- a/Docs/FEATURES.md +++ b/Docs/FEATURES.md @@ -283,7 +283,7 @@ HKCU:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI\DisableRecallDataProviders = HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI\SetDenyAppListForRecall = [...] HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI\SetDenyUriListForRecall = [...] HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI\SetMaximumStorageDurationForRecallSnapshots = 30 -HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI\SetMaximumStorageSpaceForRecallSnapshots = 10 +HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI\SetMaximumStorageSpaceForRecallSnapshots = 10240 HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI\TurnOffWindowsCopilot = 1 HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot\TurnOffWindowsCopilot = 1 HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot\ShowCopilotButton = 0 diff --git a/Modules/AntiAI/Config/AntiAI-Settings.json b/Modules/AntiAI/Config/AntiAI-Settings.json index ebb1293..a8a9266 100644 --- a/Modules/AntiAI/Config/AntiAI-Settings.json +++ b/Modules/AntiAI/Config/AntiAI-Settings.json @@ -100,8 +100,8 @@ }, "SetMaximumStorageSpaceForRecallSnapshots": { "Type": "DWord", - "Value": 10, - "Description": "Maximum snapshot storage: 10 GB (Choices: 10/25/50/75/100/150 GB, 0=OS default)" + "Value": 10240, + "Description": "Maximum snapshot storage: 10 GB = 10240 MB (Choices: 10240/25600/51200/76800/102400/153600 MB, 0=OS default)" } } } diff --git a/Modules/AntiAI/Private/Set-RecallProtection.ps1 b/Modules/AntiAI/Private/Set-RecallProtection.ps1 index cd5ab56..292ebfd 100644 --- a/Modules/AntiAI/Private/Set-RecallProtection.ps1 +++ b/Modules/AntiAI/Private/Set-RecallProtection.ps1 @@ -95,14 +95,14 @@ function Set-RecallProtection { Write-Log -Level DEBUG -Message "Set max snapshot retention: 30 days" -Module "AntiAI" $result.Applied++ - # 4. Storage Space Limit - Max 10 GB + # 4. Storage Space Limit - Max 10 GB (10240 MB per MS CSP) $existing = Get-ItemProperty -Path $regPath -Name "SetMaximumStorageSpaceForRecallSnapshots" -ErrorAction SilentlyContinue if ($null -ne $existing) { - Set-ItemProperty -Path $regPath -Name "SetMaximumStorageSpaceForRecallSnapshots" -Value 10 -Force + Set-ItemProperty -Path $regPath -Name "SetMaximumStorageSpaceForRecallSnapshots" -Value 10240 -Force } else { - New-ItemProperty -Path $regPath -Name "SetMaximumStorageSpaceForRecallSnapshots" -Value 10 -PropertyType DWord -Force | Out-Null + New-ItemProperty -Path $regPath -Name "SetMaximumStorageSpaceForRecallSnapshots" -Value 10240 -PropertyType DWord -Force | Out-Null } - Write-Log -Level DEBUG -Message "Set max snapshot storage: 10 GB" -Module "AntiAI" + Write-Log -Level DEBUG -Message "Set max snapshot storage: 10 GB (10240 MB)" -Module "AntiAI" $result.Applied++ # Verify @@ -111,7 +111,7 @@ function Set-RecallProtection { $verified = ($null -ne $values.SetDenyAppListForRecall) -and ($null -ne $values.SetDenyUriListForRecall) -and ($values.SetMaximumStorageDurationForRecallSnapshots -eq 30) -and - ($values.SetMaximumStorageSpaceForRecallSnapshots -eq 10) + ($values.SetMaximumStorageSpaceForRecallSnapshots -eq 10240) if ($verified) { Write-Log -Level DEBUG -Message "Verification SUCCESS: All Recall protection policies applied" -Module "AntiAI" diff --git a/Modules/AntiAI/Private/Test-AntiAICompliance.ps1 b/Modules/AntiAI/Private/Test-AntiAICompliance.ps1 index abecfaa..794c838 100644 --- a/Modules/AntiAI/Private/Test-AntiAICompliance.ps1 +++ b/Modules/AntiAI/Private/Test-AntiAICompliance.ps1 @@ -235,7 +235,7 @@ $protectionChecks = @( (Test-RegistryValue -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI" -Name "SetDenyAppListForRecall" -ExpectedValue $expectedDenyApps -Description "App Deny List"), (Test-RegistryValue -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI" -Name "SetDenyUriListForRecall" -ExpectedValue $expectedDenyUris -Description "URI Deny List"), (Test-RegistryValue -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI" -Name "SetMaximumStorageDurationForRecallSnapshots" -ExpectedValue 30 -Description "Max Retention: 30 days"), - (Test-RegistryValue -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI" -Name "SetMaximumStorageSpaceForRecallSnapshots" -ExpectedValue 10 -Description "Max Storage: 10 GB") + (Test-RegistryValue -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI" -Name "SetMaximumStorageSpaceForRecallSnapshots" -ExpectedValue 10240 -Description "Max Storage: 10 GB (10240 MB)") ) foreach ($check in $protectionChecks) { $results.Details += $check