Java 中的 PowerShell v2 远程协议
我正在尝试使用 Java 创建和发送远程 powershell 命令的消息,通过 ws-man 运行。具体实现是针对 Office365 的,但我遇到的问题是我无法弄清楚如何手动创建有效的 powershell 命令,因为消息格式的规范似乎与实际需要发送的内容不匹配:
http://msdn.microsoft.com/en- us/library/dd303832(v=PROT.10).aspx
还有其他人遇到过这个问题吗?我需要在没有 .Net 的情况下完成这项工作,但我不确定目前是否真的可行。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这可能是相关的,但我没有尝试过,它是英特尔提供的 Java ws-man 客户端:
http://software.intel.com/en-us/articles/download-the-latest-intel-ws-management-java- client-library/
至少,它有源代码,您可以查看它是如何完成的。
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.
我不是 WS-Man 方面的专家,但我确实读过这篇关于使用非 Windows 客户端启动 PowerShell 命令的文章。我想这对你会有帮助。
http://blogs.msdn.com/b/wmi/archive/2011/01/25/using-ws-man-to-invoke-a-powershell-cmdlet.aspx
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