⚡ PowerShell 5.1+

Disable Storage Sense Low-Space Notifications

Silences low-disk-space notifications from Storage Sense.

By WindowsScripting.com · 776 B
Set-DisableStorageSenseNotifications.ps1
<#
.SYNOPSIS
    Disable Storage Sense Low-Space Notifications.

.DESCRIPTION
    Silences low-disk-space notifications from Storage Sense.

    Sets HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy \ 512 to 0.

.EXAMPLE
    .\Set-DisableStorageSenseNotifications.ps1
#>

[CmdletBinding()]
param()

$regPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy'

if (-not (Test-Path $regPath)) {
    New-Item -Path $regPath -Force | Out-Null
}

New-ItemProperty -Path $regPath -Name '512' -Value 0 -PropertyType DWord -Force | Out-Null

Write-Host "Disable Storage Sense Low-Space Notifications applied. Sign out and back in (or restart explorer.exe) for it to fully take effect." -ForegroundColor Green