locked
Connecting to remote server failed with the following error message : <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="3762507597" RRS feed

  • Question

  • User-1651604128 posted

    In asp.net MVC web app, I was trying to connect the remote Exchange server through powershell , these are the codes:

     ...

    runspace = RunspaceFactory.CreateRunspace(connectionInfo);

    try {

    runspace.Open(); // the error comes from this line

    ....

    Connecting to remote server ProdServer.ca failed with the following error message :
    <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="3762507597"
    Machine="ProdServer.CA"><f:Message><f:ProviderFault provider="PowerShellplugin"
    path="%windir%\system32\pwrshplugin.dll"></f:ProviderFault></f:Message></f:WSManFault>
    For more information, see the about_Remote_Troubleshooting Help topic.

    After googling , it seems it caused there is no enough powershell memory, is this related to my local machine (localhost) who is running this C# codes or it is remote server computer? and how to increase the memory space?

    I tried this codes :  winrm setwinrm/config/winrs `@`{MaxMemoryPerShellMB=`"512`"`} , but it is doesnot work.

    Is this related to Powershell version? does different powershell has different command to increase the space?

    I am using Windows 10 with Visual Studio 2017 Enterprise version.   

    thanks

    Friday, October 11, 2019 4:34 PM

All replies

  • User-1651604128 posted

    any ideas? thanks a lot for any help,

    Sunday, October 13, 2019 4:29 PM
  • User283571144 posted

    Hi Peter Cong,

    According to your description and error codes,  it seems that this error is related with the pwrshplugin.dll not MVCSince our forum is mainly talking about asp.net MVC develop issue(we are not familiar with powershell). I suggest you could try to start a issue on powershell github issues.

    Link as below:

    https://github.com/PowerShell/PowerShell/issues 

    Best Regards,

    Brando

    Monday, October 14, 2019 9:30 AM