What does the powershell property MaxConcurrentCommandsPerShell stand for?


i writing application spawn persistent remote runspace.

then every request create object of system.management.automation.powershell class, associate runspace, add powershell script , invoke same. once script invoked, dispose system.management.automation.powershell class object. here, not dispose, runspace (powershell session).

after running application time (>2-3 hours) powershell call fails exception says quota maximum concurrent commands per shell has exceeded.

since, create new instance of system.management.automation.powershell class every request, wondering how/why same script fail after 2-3 hours mentioned exception.

i wanted understand, if there something, need additionally dispose/cleanup?

i see maxconcurrentcommandspershell set reasonably high value of 1024, wanted know how limit evaluated. executing script in shell and, not think script commands executed concurrently, rather sequential.

can please if understanding incorrect somewhere?

warm regards

himanshu agarwal



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

2008 Windows Deployment Server Properties Error

Can no longer user MS Update - Files required to use Microsoft Update are no longer registered

How do a find data in one file, search for it in another file and if not found, write a custom message to another file