Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 8583

Not enough quota is available to process this command.

$
0
0

Hi, I'm trying to run a script in a remote Powershell session and I get a 'Not enough quota is available to process this command.' error. The symptoms are identical with the one reported in this bug:

https://connect.microsoft.com/PowerShell/feedback/details/775399/quotas-ignored-after-wmf-3-0-update

but I'm using Powershell 4.0 and the hot fix is not being installing against my Powershell:

http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=2842230&kbln=en-us

 

This is how I'm calling the remote script:

 

$cred =Get-CredentialEnter-PSSession remote1 -AuthenticationCredSSP-cred $cred
cd d:\dev.\Build.ps1

 

 

Instead of calling the .\Build.ps1 the error can be simple reproduced with this line:

cmd /C cmd /C cmd /C cmd /C cmd /C cmd /C cmd /C cmd /C cmd /C cmd /C cmd /C cmd /C cmd /C cmd /C cmd /C cmd /C cmd /C cmd /C cmd /C cmd /C cmd /C cmd

cmd :Not enough quota is available to process this command.
    +CategoryInfo         :NotSpecified:(Not enough quot...s this command.:String)[],RemoteException
    +FullyQualifiedErrorId:NativeCommandError

 

Deleting a few cmds from the above line will make the rest of them to run.

 

I tried changing the MaxMemoryPerShellMB and MaxProcessesPerShell limits but nothing works:

 

winrm set winrm/config/winrs '@{MaxProcessesPerShell="10000"}'
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="2048"}'
This is how my winrm settings look like:
Winrs
    AllowRemoteShellAccess = true
    IdleTimeout = 7200000
    MaxConcurrentUsers = 10
    MaxShellRunTime = 2147483647
    MaxProcessesPerShell = 1000000
    MaxMemoryPerShellMB = 2048
    MaxShellsPerUser = 200

Viewing all articles
Browse latest Browse all 8583

Trending Articles