Home Blog “Not enough quota” when creating WPF scripts
 

“Not enough quota” when creating WPF scripts

When you build WPF user interfaces with PowerShell, you may occasionally get a weird error message: “Not enough quota is available to process this command”. Let’s check out what this means and what you can do about it.

Quotas – Out of Memory, really

The reason for the error message really is a lack of available memory. So when you close some other applications, the error may go away.

Typically, when you get this error frequently, your Windows page file is just too small. A permanent remedy is to just increase your page file.

Why does it happen with ISESteroids?

So it’s a Windows thing, not an ISESteroids issue? Yes, but. When you run the ISE editor without ISESteroids, you may not get the exception (or less frequently). This is because ISESteroids requires some extra memory on itself. By adding ISESteroids, a system with already low memory may get pushed even harder.

So bottom line is: review your paging file settings, and make sure your machine has enough resources. You may benefit from it in other areas as well. The WPF exception is just a symptom of a more general problem with your system.