A lightweight PowerShell script that permanently prevents Windows, Discord, G HUB, and other apps from automatically lowering your microphone volume.
Tested on Windows 11 with a Logitech G Pro X 2, but works for any microphone affected by auto-gain control.
Apps like Discord, Logitech G HUB, Chrome, and Windows itself constantly fight over your microphone volume lowering it automatically through exclusive mode, AGC, or Blue VO!CE limiters.
A PowerShell script runs silently in the background via Windows Task Scheduler. Every 10 seconds it checks your default recording device volume and forces it back to 100 if anything changed it.
No bloat. No tray icon. No third-party apps running 24/7.
- Windows 10 or 11
- PowerShell 5.1+ (pre-installed on Windows)
- AudioDeviceCmdlets PowerShell module
Open PowerShell as Administrator and run:
Install-Module -Name AudioDeviceCmdlets -Force -Scope AllUsersVerify it installed correctly:
Get-Module -ListAvailable AudioDeviceCmdletsCreate the folder and place mic_lock.ps1 inside it:
C:\Scripts\mic_lock.ps1
You can clone this repo or manually create the file with the contents from mic_lock.ps1.
Run each line in PowerShell as Administrator:
$action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-WindowStyle Hidden -ExecutionPolicy Bypass -File C:\Scripts\mic_lock.ps1"
$trigger = New-ScheduledTaskTrigger -AtLogOn
$settings = New-ScheduledTaskSettingsSet -Hidden -ExecutionTimeLimit ([TimeSpan]::Zero)
Register-ScheduledTask -TaskName "MicLock" -Action $action -Trigger $trigger -Settings $settings -RunLevel Highest -ForceYou should see this output confirming the task was created:
- Open Task Scheduler
- Find
MicLockin the task list - Right-click → Run
- Lower your mic volume manually — it should snap back to 100 within 10 seconds
To change how often the script checks (default: every 10 seconds), edit mic_lock.ps1:
Start-Sleep -Seconds 10 # change this valueThen restart the task in Task Scheduler: right-click MicLock → End, then → Run.
- CPU usage: ~0% (sleeping between checks)
- RAM usage: ~15–20 MB
- No memory leaks — the loop only sleeps and sets a value
To remove the scheduled task:
Unregister-ScheduledTask -TaskName "MicLock" -Confirm:$falseThen delete C:\Scripts\mic_lock.ps1.
If this saved your sanity, consider buying me a coffee:
Bitcoin (BTC) bc1qk5jlu7hk05uvfpt33pgeaf78lzvnkgjyur8q04
Ethereum (ETH) 0xd8834fc5330896405EC1A5db4bE997093E0408A7
USDC (ETH) 0xd8834fc5330896405EC1A5db4bE997093E0408A7
GNU




