locked
MS-WSMV: Powershell as a customremoteshell RRS feed

  • Question

  • Hi,

    In order to understand the SOAP messages required to use Powershell as a custom remote shell using my MS-WSMV client, I attempted to use the Winrm command:

    winrm get winrm/config/winrs/customremoteshell?URI=shell/Microsoft.Powershell

    However, I observed that Winrm is receiving a WS-Fault from the server (a Windows 7 machine) in reply, and Winrm informed me:

    Error number:  -2144108100 0x803381BC
    The WinRM client cannot process the request. Custom Remote Shell has been deprecated and cannot be used.

    Is this true??  I was really hoping to simply use MS-WSMV to interact with Powershell, instead of having to implement the entire MS-PSRP specification.

    Saturday, September 1, 2012 2:01 PM

Answers

  • The solution is to run powershell.exe in a regular shell with the "-File -" option, and just work with the streams.
    • Marked as answer by fhv_dave Tuesday, September 18, 2012 6:39 PM
    Tuesday, September 18, 2012 6:39 PM

All replies

  • Hi fhv_dave,

    Thank you for your question. A member of the protocol documentation team will respond to you soon.

    Regards,
    Vilmos Foltenyi - MSFT

    Saturday, September 1, 2012 8:12 PM
  • Hi fhv_dave

    Thanks for contacting Microsoft Support. I will be asssiting you on this inquiry and appreciate if you can share following details:

    1. Are you executing this command, "winrm get winrm/config/winrs/customremoteshell?URI=shell/Microsoft.Powershel", using your WSMV client or windows winrm provider ? If windows winrm provider, please share the client OS (Win7, Vista etc.).

    2. Can you please send network trace to dochelp at microsoft dot com, Attention: Tarun Chopra.

    Thanks


    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Sunday, September 2, 2012 5:05 PM
  • Hi Tarun, I've sent information to your attention at the email address you indicated.  Thanks!
    Monday, September 3, 2012 12:31 AM
  • David

    Thanks for sharing the details. I have sent you an acknowledgement mail with case number. I will work with you offline and we will post the final outcome on this forum so that others can benefit.

    Thanks


    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Tuesday, September 4, 2012 8:01 AM
  • The solution is to run powershell.exe in a regular shell with the "-File -" option, and just work with the streams.
    • Marked as answer by fhv_dave Tuesday, September 18, 2012 6:39 PM
    Tuesday, September 18, 2012 6:39 PM
  • Any updates on this case? I cannot create custom shell too.

    Same error "The WinRM client cannot process the request. Custom Remote Shell has been deprecated and cannot be used"

    Friday, November 13, 2015 4:42 PM
  • Hi igor.golikov,

    Thanks for your request regarding WinRM. One of the Open Specifications team members will reply shortly to work with you on this.

    Best regards,
    Tom Jebo
    Microsoft Open Specifications

    • Proposed as answer by igor.golikov Friday, November 13, 2015 7:22 PM
    • Unproposed as answer by igor.golikov Friday, November 13, 2015 7:23 PM
    Friday, November 13, 2015 6:48 PM
  • Hello igor

    I assume that you are testing this against windows7 or later OS. If so, kindly read this :

    "Per, Windows behavior Note 12 ( http://msdn.microsoft.com/en-us/library/f8ba005a-8271-45ec-92cd-43524d39c80f(v=prot.10)#id12 ) of MS-WSMV specification , CustomRemoteShell was deprecated in Win7 and the error you are getting is a documented behavior. MS-PSRP protocol was introduced starting Win7 for powershell remoting. If you use Vista or win2008 as your target server then this error will hopefully go away."

    Please let us know if this information resolves your issue else we will dig deeper.

    Regards


    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    • Proposed as answer by igor.golikov Friday, November 13, 2015 7:23 PM
    Friday, November 13, 2015 7:05 PM
  • Thank you, that make sense, I tested it against 2012 and 2012R2
    Friday, November 13, 2015 7:25 PM
  • Glad we are able to help. Have a great day.

    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Friday, November 13, 2015 10:36 PM