Powershell instance inside WinRM
-
Thursday, January 10, 2013 8:39 AMHi,
I am creating cmd instance on remorte WinRM service using below SOAP message
<s:Envelope
xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">
<s:Header>
<wsa:To>
http://localhost:5985/wsman
</wsa:To>
<wsman:ResourceURI s:mustUnderstand="true">
http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd
</wsman:ResourceURI>
<wsa:ReplyTo>
<wsa:Address s:mustUnderstand="true">
http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
</wsa:Address>
</wsa:ReplyTo>
<wsa:Action s:mustUnderstand="true">
http://schemas.xmlsoap.org/ws/2004/09/transfer/Create
</wsa:Action>
<wsman:MaxEnvelopeSize s:mustUnderstand="true">153600</wsman:MaxEnvelopeSize>
<wsa:MessageID>uuid:AF6A2E07-BA33-496E-8AFA-E77D241A2F2F</wsa:MessageID>
<wsman:Locale xml:lang="en-US" s:mustUnderstand="false" />
<wsman:OptionSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<wsman:Option Name="WINRS_NOPROFILE">TRUE</wsman:Option>
<wsman:Option Name="WINRS_CODEPAGE">437</wsman:Option>
</wsman:OptionSet>
<wsman:OperationTimeout>PT60.000S</wsman:OperationTimeout>
</s:Header>
<s:Body>
<rsp:Shell xmlns:rsp="http://schemas.microsoft.com/wbem/wsman/1/windows/shell">
<rsp:InputStreams>stdin</rsp:InputStreams>
<rsp:OutputStreams>stdout stderr</rsp:OutputStreams>
</rsp:Shell>
</s:Body>
</s:Envelope>
I just need the equivalent SOAP message to create powershell instance so that I can directlly send cmdlet to that instance
All Replies
-
Thursday, January 10, 2013 5:01 PMModerator
Hi Mohd,
Thank you for your question. An engineer from the Protocols team will contact you soon.
Bryan S. Burgin Senior Escalation Engineer Microsoft Protocol Open Specifications Team
-
Friday, January 11, 2013 12:33 AM
Hi Mohd
Thank you for contacting Microsoft Support. I have taken ownership of this request and will be assisting you.
I worked with a forum poster , David, earlier and he suggested a workaround by running a powershell.exe as a regular shell. Would appreciate if you can please have a look at this thread : http://social.msdn.microsoft.com/Forums/en-US/os_windowsprotocols/thread/73b48bb1-5eda-4816-8ade-db5630622e1c and analyze if it resolves your query.
Furthermore, I believe you are referring MS-WSMV specification (http://msdn.microsoft.com/en-us/library/cc251526.aspx) while framing above SOAP message. Kindly confirm if this understanding is correct.
Thanks.
Tarun Chopra | Escalation Engineer | Open Specifications Support Team
- Edited by Tarun Chopra - MSFT Friday, January 11, 2013 12:34 AM
-
Wednesday, January 16, 2013 11:13 PM
Hi Mohd
Would like to touch base and check if information provided on above link was helpful.
Thanks
Tarun Chopra | Escalation Engineer | Open Specifications Support Team
-
Monday, January 21, 2013 5:19 PM
Hi Mohd
We are still looking forward to your inputs. If your issue is resolved, kindly let us know.
Thanks.
Tarun Chopra | Escalation Engineer | Open Specifications Support Team
-
Thursday, January 24, 2013 10:33 PM
Hi Mohd
I am going to be archiving this issue. If you wish to continue investigating this matter in future, kindly feel free to contact us by posting a new request on this very forum or via dochelp (at) microsoft (dot) com .
We will be glad to assist.
Thanks
Tarun Chopra | Escalation Engineer | Open Specifications Support Team
- Proposed As Answer by Tarun Chopra - MSFT Thursday, January 24, 2013 10:33 PM

