There are several options for running PowerShell commands from Linux.
Run the PowerShell script over a REST interface
Unless you need a remote shell, the easiest option is to set up a REST interface for your PowerShell scripts. More information here.
Using the winrm Ruby Gem
Using a WS-Management client on Linux
Set up Windows for remote access:
Install OpenWSMAN on Linux:
Use Openwsman Command-Line Client:
OR - Use Ruby client bindings:
Install an SSH server on Windows
Install a Salt Minion on Windows
- Install Salt Master on Linux
- Install Python on Windows
- Install Salt Minion on Windows
- Open firewall on Windows for Salt access
- On Linux, run:
- # salt "winServer" cmd.run "powershell c:\path\to\script.ps1"
More information here: http://www.youtube.com/watch?v=miK25mDV9ik&feature=youtu.be
This comment has been removed by a blog administrator.
ReplyDelete