Regarding OpenWSman & PowerShell binding.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Regarding OpenWSman & PowerShell binding.

Lars Bingchong
Hi OpenWSman developers,

I'm looking into the possibility of invoking PowerShell scripts from Linux and Mac boxes.
I have looked around on your site and it is not clear for me if it is possible to use OpenWSMan together with PowerShell.

Can you elaborate?

I will be really happy to hear from you. Also if the answer is that OpenWSMan cannot handle PowerShell as of now, is there then any plan for it to do so? Or alternatively do you know of alternative ways to control PowerShell on a remote host from Linux and Mac boxes?

Thank you very much.

--
Mvh. / Kind regards
Lars Bengtsson

- Health is wealth, movement is medicine -

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: Regarding OpenWSman & PowerShell binding.

Johnny Hwang

As far as I can understand, PowerShell is meant for Windows-to-Windows communication only for boxes with Powershell installed.

 

A subset of PowerShell commands are exposed remotely via WMI.

 

So no, it is not possible to invoke PowerShell scripts via OpenWSMan natively (you can always install your own Powershell-to-WMI provider on the target Windows machine to get around that, but that’s not native).

 

However, it is possible to invoke WMI commands via OpenWSMan (which supports Linux and Mac boxes), and all WMI commands correspond to a small subset of PowerShell commands.

 

For example:

 

PowerShell: Get-WmiObject -Namespace root/cimv2 Win32_service

WMI: ./wsman -h yourhost.com -u Administrator -p 'password' --auth=basic enumerate http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_Service

 

Hope this helps,

Johnny Hwang

 

From: Lars Bingchong [mailto:[hidden email]]
Sent: Wednesday, December 11, 2013 1:36 PM
To: [hidden email]; [hidden email]
Subject: [Openwsman-devel] Regarding OpenWSman & PowerShell binding.

 

Hi OpenWSman developers,

I'm looking into the possibility of invoking PowerShell scripts from Linux and Mac boxes.

I have looked around on your site and it is not clear for me if it is possible to use OpenWSMan together with PowerShell.

Can you elaborate?

I will be really happy to hear from you. Also if the answer is that OpenWSMan cannot handle PowerShell as of now, is there then any plan for it to do so? Or alternatively do you know of alternative ways to control PowerShell on a remote host from Linux and Mac boxes?

Thank you very much.


--
Mvh. / Kind regards
Lars Bengtsson

- Health is wealth, movement is medicine -


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: Regarding OpenWSman & PowerShell binding.

Klaus Kaempf
In reply to this post by Lars Bingchong
* Lars Bingchong <[hidden email]> [Dec 11. 2013 22:36]:
> Hi OpenWSman developers,
>
> I'm looking into the possibility of invoking PowerShell scripts from Linux
> and Mac boxes.
> I have looked around on your site and it is not clear for me if it is
> possible to use OpenWSMan together with PowerShell.

Lars,

executing remote powershell commands is possible with Openwsman since
version 2.4.0.
See
https://github.com/Openwsman/openwsman/blob/master/bindings/ruby/tests/winrs.rb
for example code how to use this capability.

Another alternative is https://github.com/WinRb/WinRM, which purely
focuses on Windows remote command execution.

Hth,

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel