开发者

PowerShell v2 Remoting Protocol in Java

I'm trying to use Java to create and send messages for remote powershell commands, running over ws-man. The specific implementation is for Office365, but the issue I'm having is that I can't figure out how to create valid powershell commands by hand because the spec for the message format doesn't seem to match what actually needs to be sent:

http://msdn.microsoft.com/en-us/library/dd303832(v=PROT.10).aspx

Has anybody else run into this issue? I开发者_如何学编程 need to make this work without .Net, but I'm not sure if it's actually possible at this point.


This might be relevant, I've not tried it though, it's a Java ws-man client provided by Intel:

http://software.intel.com/en-us/articles/download-the-latest-intel-ws-management-java-client-library/

At the least, it has source code you can look at to see how it's done.


I'm not an expert on WS-Man, but I did run across this article on launch PowerShell commands with a non-Windows client. I think it will be helpful to you.

http://blogs.msdn.com/b/wmi/archive/2011/01/25/using-ws-man-to-invoke-a-powershell-cmdlet.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜