This user is allowed a maximum number of 5 concurrent shells, which has been exceeded.

I have a C# component which executes Powershell scripts in powershell environment. Suddenly it started to show some issues, Now, when I try to execute the following, it shows exception
    Enter-PSSession -ComputerName 192.21.10.71 -Credential abc\admin
The exception is given below...
    Enter-PSSession : Connecting to remote server failed with the following error message : 
    The WS-Management service cannot process the request. **This user is allowed a maximum 
    number of 5 concurrent shells, which has been exceeded.** Close existing shells or raise 
    the quota for this user. For more information, see the about_Remote_Troubleshooting 
    Help topic.
    At line:1 char:16
    + Enter-PSSession <<<<  -ComputerName 192.21.10.71 -Credential abc\admin
        + CategoryInfo          : InvalidArgument: (192.21.10.71:String) [Enter-PSSession], 
    PSRemotingTransportException
        + FullyQualifiedErrorId : CreateRemoteRunspaceFailed
I fear, this is because I haven't properly closed / disposed the runspaces created in c# component.
Here is the code extracted from my component
Collection<PSObject> objPS = new Collection<PSObject>();
    PowerShell powershell = PowerShell.Create();
PSCredential credential = new PSCredential(strUserName, password);
    objRunspace = RunspaceFactory.CreateRunspace();
objRunspace.Open();
objPS = powershell.Invoke();
finally 
                objRunspace.Dispose();
I am beating the bush, instead of finding the root cause of this issue.
Thanks...

Hi,
Even I am facing the same issue while trying to open session in my C# code. 
I have created and using one System.Management.Automation.Runspaces.Runspace object. Which is created by calling Open() method.
At the end while exiting the program I am calling Dispose() method.
Initially when I wrote this client, I was able to run powershell commands without any issue. After some days of use I got this below exception.
Result Message: Assembly Initialization method 
InitializeLyncTestSuite threw exception. System.Management.Automation.Remoting.PSRemotingTransportException: System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to remote server failed with the following error message : The WS-Management
service cannot process the request. The maximum number of concurrent shells for this user has been exceeded. Close existing shells or raise the quota for this user. For more information, see the about_Remote_Troubleshooting Help topic.. Aborting test execution.
Result StackTrace:
at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
   at System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.EndOpen(IAsyncResult asyncResult)
   at System.Management.Automation.Runspaces.Internal.RemoteRunspacePoolInternal.Open()
   at System.Management.Automation.Runspaces.RunspacePool.Open()
   at System.Management.Automation.RemoteRunspace.Open()
After restarting all the Lync Server services I was able to avoid this exception. But after using this client couple of times now, I am facing the same issue again.
Does calling Dispose() method is not enough for closing a session from C# code? Or should I use something else to close session from C# client?

Similar Messages

  • Why am i having this problem on icloud "the maximum number of free account have been activated on this ipad"

    Why am i having this problem on icloud "the maximum number of free account have been activated on this ipad"

    Judging from other posts it looks like there is a maximum of 3 accounts that can be created on a device - you could either re-use one of the accounts that you've already created or create a new one on a different device or computer

  • Is this an error? IWSSessionManager: Maximum number of sessions is 1000

    Hi,
    When this line appear in the error log of Iplanet 6 or Sun ONE 6.1... Is this an error?
    IWSSessionManager: Maximum number of sessions is 1000
    on what situation does this usually appear? (i.e. startup) ?
    thanks

    This is an "info" message and normally is seen upon startup. If you run out of sessions you should see something like follows:
    "IWSSessionManager: cannot create a new session as the limit on maximum number of sessions has already been reached: (1000)"
    Thanks
    Manish

  • The maximum number of Web Parts for all zones on this page has been exceeded.

    Hi All,
    I am getting following error message when making a new view for SharePoint Form Library
    The maximum number of Web Parts for all zones on this page has been exceeded.
    Any help in this regard will be greatly appreciated...

    When you are looking at the page append the following at the end of your URL:  ?contents=1
    Your URL should look something like this:
    http://contoso/site/default.aspx?contents=1
    This will open the web part maintenance page.  How many web parts are listed?  You might have a large number of closed web parts that aren't showing on the page but are actually still there.
    John
    SharePoint911: SharePoint Consulting
    Blog: http://www.rossonmoss.com
    Twitter: JohnRossJr
    MOSS Explained: An Information Workers Deep Dive into Microsoft Office SharePoint Server 2007

  • Total number of users in NetPoint License has been exceeded

    I am keep getting this msg on my website.
    I goto admin > business partner > license users and delete all users except manager the msg goes away and after few hours it comes back again
    Total number of users in NetPoint License has been exceeded.
    Some features may not function properly.
    Please remove a user or upgrade your license.

    Hi Ghanbary,
    You may need to check the "Do not assign licensed user role to super users" option in the Synch Manager application.

  • The maximum number of instances has been exceeded

    Hi,
    I my PROD environment i am getting this type of exception.
    Instance Cache: Opening the cache for process '/ProcessName#Default-1.0'. The maximum number of instances has been exceeded.
    any suggestion ?
    Thanks,
    Brijesh Kumar Singh

    Hi Brijesh,
    Please post the Complete StackTrace. When are you getting this exception...means which operation are u performing?
    Are u in a Clustered Environment?
    Which version of WLS are u using?
    by anychance Are you getting the following Oracle Error Code in your Server Logs anywhere: ORA-00020 ?
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)

  • Iba allow others to make text edits. What workflow are you guys using to allow others to make text edits once the iBook has been layed out and formatted?  Is it too late? Do I need to export txt then reimport the editted text and reformat it all again?

    iba allow others to make text edits. What workflow are you guys using to allow others to make text edits once the iBook has been layed out and formatted?  Is it too late? Do I need to export txt then reimport the editted text and reformat it all again?

    Hi Ken,
    Thanks for the reply. The project I am working on is a test project for a customer. They could potentially want a number of their educational subjects presented as an interactive text book. The intent of this first project with them is to establish a logical workflow that will allow us to efficiently estimate costs and allow for review throughout the design process. Having worked with customers on creative projects in the past I can anticipate that they will want a number of changes made once they see a working version of the interactive text book.
    It is a grim reality that no project can be fully edited and planned prior to working on it and I know revisions and changes are always made once the customer can see their product. It is ok with me if there is no easy way to pass the text back and forth from the customer and me without having to reformat everything but I just want to know that is the way it works in order to provide a realistic time estimate for the project.
    My hope was I would be able to export the formatted text, allow them to make edits and then reimport that formatted text. The style sheets I am using are from one of the iBooks Author templates.
    Do you know if there is a way to use (or export ) this style sheet so it can be used in a Pages Document?
    Or, would the best option be to have the customer install iBooks Author? This would require the customer to have a mac and the software so it doesn't work for all cases.
    Another idea I was considering would be to export the book as a PDF and have the customer add markup and notes to the PDF.
    All of these options do not seem too great to me.
    I am open to any ideas.
    Thanks,
    Rob

  • I have a new MacBook Pro with OS10.8.2 and cannot get Contacts to print a list of addresses with pictures showing.  There is a check box selecting "picture" which has been checked - but no picture.  This worked fine on OS10.7.5.  Problem??

    I have a new MacBook Pro with OS10.8.2 and cannot get Contacts to print a list of addresses with pictures showing.  There is a check box selecting "picture" which has been checked - but no picture.  This worked fine on OS10.7.5.  Problem??

    First, back up all data immediately, as your boot drive might be failing.
    There are a few other possible causes of generalized slow performance that you can rule out easily.
    Reset the System Management Controller.
    If you have many image or video files on the Desktop with preview icons, move them to another folder.
    If applicable, uncheck all boxes in the iCloud preference pane.
    Disconnect all non-essential wired peripherals and remove aftermarket expansion cards, if any.
    Check your keychains in Keychain Access for excessively duplicated items.
    If you have more than one user account, you must be logged in as an administrator to carry out this step.
    Launch the Console application in the same way you launched Activity Monitor. Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Select the 50 or so most recent entries in the log. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V). You're looking for entries at the end of the log, not at the beginning.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some personal information, such as your name, may appear in the log. Anonymize before posting. That should be easy to do if your extract is not too long.

  • How can I allow the application to line through a field that has been locked after being digitally signed?  We have multiple sections on a form with some fields being proposed information and other in another section having the approved information. once

    How can I allow the application to line through a field that has been locked after being digitally signed?
    We have multiple sections on a form with some fields being proposed information and other in another section having the approved information. once the approved information is entered we line through the proposed field so the data entry clerk won't pick up the wrong information.  However we are receiving an error when attempting to enter data  in the field which we have this edit.  Error property: line through cannot be set because doing so would violate the document permission setting.  any idea how we can get around this issue?

    You can control which fields are locked down after signing by setting up a collection. Then those that are not locked can be changed after signing. If this is not possible, then the line outs must occur prior to signing.

  • ALBPM 6.0 : The maximum size for file uploads has been exceeded.

    Hi,
    I use AquaLogic BPM Entreprise server to deploy my Process. When I try to publish a process on my server I get the following error:
    An unexpected error ocurred.
    The error's technical description is:
    "javax.servlet.jsp.JspException: null"
    Possible causes are:
    The maximum size for file uploads has been exceeded.
    If you are trying to publish an exported project you should publish it using the remote project option.
    If you are trying to upload the participant's photo you should choose a smaller one.
    An internal error has ocurred, please contact support attaching this page's source code.
    Has someone resolve it?
    Thank's.

    Hi,
    Sure you've figured this out by now, but when you get the "Maximum size for file uploads" error during publish consider:
    1. if your export project file is over 10mb, use "Remote Project" (instead of "Exported Project") as the publication source. That way when you select the remote project, you will point to ".fpr" directory of the project you are trying to publish.
    Most times your project is not on a network drive that the server has access to. If this is the case, upload the .exp file to the machine where the Process Administrator is running, then expand it in any directory (just unzip the file). Then, from the Process Administrator, use the option to publish a Remote Project by entering the path to the .fpr directory you just created when unzipping the project.
    2. Check to see if you have cataloged any jars and marked them as non-versionable. Most of the times the project size is big just because of the external jar files. So as a best practice, when you do a project export select the option "include only-versionable jars", that will get reduce the project size considerably (usually to Kb's). Of course you have to manually copy the Jar files to your Ext folder.
    hth,
    Dan

  • The maximum size of an SQL statement has been exceeded.

    In ST22, abap dump shows that one of the possible reason was "The maximum size of an SQL statement has been exceeded."
    How can I know what's the maximum size and how to compute that size had been reached?
    Is this shown anywhere in the log?

    1. decalre temp_key as a table.
    2. use this package size option ....this gets the data in bite-sized chunks
    SELECT MATKL MATNR MEINS
    INTO corresponding fields of table TEMP_KEY package size 1000
    FROM MARA
    WHERE MATNR IN SO_MATNR.
    loop at temp_key.
    MOVE-CORRESPONDING TEMP_KEY TO ITAB_KEY1.
    IF WS_PCHR SPACE.
    CLEAR ITAB_CHAR.
    CLEAR ITAB_KEY1-CHARACTER. REFRESH ITAB_KEY1-CHARACTER.
    PERFORM GET_CHAR TABLES ITAB_CHAR ITAB_KEY1-CHARACTER
    USING ITAB_KEY1-MATNR.
    ENDIF.
    APPEND ITAB_KEY1. CLEAR ITAB_KEY1.
    endloop.
    ENDSELECT.

  • "maximum size of requests for one LUW has been reached"

    Hi
    In Rfc to jdbc scenario,
    how can remove this error
    "maximum size of requests for one LUW has been reached"
    thanks

    can u pls tell ,
    while mapping the rfc wth jdbc request message,
    where shud this "access" node be mapped
    i mapped it wth the root element of rfc message type that contains the fields structure as the child elemnts in this case shud be fileds--is it right?
    also the err now has changed to "Commit fault: com.sap.aii.af.rfc.afcommunication.rfcAFWException: senderA"
    thanks

  • SAPSCRIPT error - Maximum Output length has been exceeded by 255

    - SAP SCRIPT ERROR: 'Maximum Outout length has been exceeded by 255 by Symbol &SPELL-WORD&.
    Any one had same issue .
    Thank You,

    Hi I have this error in ECC 6.0 but not in 4.6 for the same program..

  • HT3728 Base station error, air port utility was unable to find my airport device. Why does it say this when it recognizes my airport on the computer? Yellow light has been on

    Base station error, air port utility was unable to find my airport device. Why does it say this when it recognizes my airport on the computer? Yellow light has been on

    On the older version of the AE you can still use older airport utility.
    But once you load the new one you cannot easily go back.. you can load an older 5.6 version though.. instructions below.
    For 6.3 you need to run ipv6 local link.
    see http://support.apple.com/kb/TS4597
    How to load 5.6 into ML.
    1. Download 5.6 for Lion.
    http://support.apple.com/kb/DL1482
    Click to open the dmg but do not attempt to install the pkg.. it won't work anyway.
    Leave the package open on the desktop so you can see the file. AirportUtility56.pkg
    2. Download and install unpkg.
    http://www.timdoug.com/unpkg/
    Run unpkg on the desktop.. If your Mac refuses to run the software, because it wasn’t downloaded from the Apple store, go to security in preferences and allow other software to work.. this is limitation of trade methinks. You can set back later if you like.
    Now drag the AirPortUtility56.pkg file over to unpkg.. and it will create a new directory of the same name on the desktop.. in finder, open the new directory, drill down.. applications, utilities .. there lo and behold is Airport utility 5.6 .. drag it to your main utilities directory or just run it from current location.
    You cannot uninstall version 6 (now 6.3 if you updated) so don't try.. and you cannot or should not run them both at the same time.. although I have had no problems when doing so.

  • How can I allow the apHow can I allow the application to line through a field that has been locked after being digitally signed? plication to line through a field that has been locked after being digitally signed?

    How can I allow the application to line through a field that has been locked after being digitally signed?
    We have multiple sections on a form with some fields being proposed information and other in another section having the approved information. once the approved information is entered we line through the proposed field so the data entry clerk won't pick up the wrong information.  However we are receiving an error when attempting to enter data  in the field which we have this edit.  Error property: line through cannot be set because doing so would violate the document permission setting.  any idea how we can get around this issue?

    HI,
    Kindly post this query in Acrobat forum:Acrobat
    Regards,
    Florence

Maybe you are looking for

  • Cannot open the webi reports

    hi guys, i have a problem opening a webi report. Actually, CMS and Bo are installed in different server. The reports which are connected to cms are not able to load where as the report connected to standalone are loading properly. I'm not getting any

  • Third party delay plugin

    Hi, I'm planning to get rid of some hardware effects. There's a lot of reverb effects out there, but could anybody recommend a third party AU plugin to replace my TC Electronics D-Two Multitap Delay? Best Regards, Olov Stockholm

  • Weblogic server 9.2 How to clear up JMS file store messages

    Hi, We are facong one issue in our weblogic production environment. The JMS file store size has become 7.2 G and its eatimg up almost all the server space. I have cheked through the jms module queues/ topics to see that if any messages are pending an

  • 10.4.3 Upgrade will not load

    hi - I am currently running 10.4.2 on a computer that came with Tiger. I am trying to upgrade to 10.4.3 and have repeatedly gotten the following message: "The digital signature for this package is incorrect. The package may have been tampered with or

  • Some suggestion for iphone chinese input~

    the ios5 has updated the chinese input, it is better now, but the button is still too small when typing in chinese, could we get the big tap space like the Japanese input? I hope Apple can take more care of chinese user