Forum Discussion

Abd1987's avatar
Abd1987
Copper Contributor
Mar 28, 2023

WSMANCONFIG

Maxconcurrentusers / maxshellruntime / maxprocessespershell / maxmemorypershell /Maxshellsperuser 

All has value as 2147483647 

 

PS version is 5.1 

 

Is this the right values - why is eveything defaulting to int[32] max value.  ? Is there a bug 

  • The values you provided, such as "Maxconcurrentusers," "maxshellruntime," "maxprocessespershell," "maxmemorypershell," and "Maxshellsperuser," are PowerShell session configuration settings that define limits for various aspects of PowerShell sessions.

    The default value of 2147483647 for these settings represents the maximum value of a 32-bit integer, which is the maximum value that can be stored in a 32-bit integer variable.

    In PowerShell version 5.1, these settings are defined in the session configuration file "Microsoft.PowerShell32.PSConsoleHost.psc1" or "Microsoft.PowerShellISE.PSConsoleHost.psc1" for 32-bit and 64-bit console hosts, respectively.

    It is possible that the default values for these settings were set to the maximum value to allow for maximum flexibility in configuring PowerShell sessions. However, it is also possible that these default values were set to the maximum value as a convenience for users, so that they do not have to specify a value for these settings unless they need to impose a specific limit.

    In any case, if you need to change any of these settings to impose a limit on a particular aspect of PowerShell sessions, you can do so by editing the appropriate session configuration file or by using the Set-PSSessionConfiguration cmdlet

Resources