# Fix high swap usage on Proxmox without buying RAM # https://www.zadran.net/guides/fix-high-swap-usage-on-proxmox # Generated from the guide, last updated 2026-10-13. # # NO WARRANTY. This script is provided as is. You are responsible for # understanding what it does before running it, and for the consequences. # Take a backup first. See https://www.zadran.net/disclaimer # # Destructive steps are left commented out on purpose -- uncomment them # only once you have understood what they do. # # If Windows will not run this file: a script saved from a browser is # marked as downloaded, and the RemoteSigned policy (the Windows Server # default) refuses it until you run Unblock-File .\fix-high-swap-usage-on-proxmox.ps1 # Where the policy is Restricted (the Windows 10 and 11 default), run it as # powershell -ExecutionPolicy Bypass -File .\fix-high-swap-usage-on-proxmox.ps1 # # These are the guide's PowerShell commands. Its bash commands are in # https://www.zadran.net/guides/fix-high-swap-usage-on-proxmox/script.sh $ErrorActionPreference = 'Stop' Get-Counter "\Memory\Committed Bytes" | Select-Object -ExpandProperty CounterSamples