HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems\Windows
The SharedSection value can have three values separated by commas. The third value controls the desktop heap size for non-interactive desktops, which the HTCondor service uses. The default is 512 (Kbytes). 60 condor_shadow daemons consume about 256 Kbytes, hence 120 shadows can run with the default value. To be able to run a maximum of 300 condor_shadow daemons, set this value at 1280.
Reboot the system for the changes to take effect. For more information, see Microsoft Article Q184802.