0

I have a Linux (Ubuntu, or maybe CentOS) server that runs Apache and PHP.

Whenever needed, I should remotely connect to a Windows Server, execute some Windows commands, and return the result.

Please introduce a tool (or a way (if no tool is required)) for that.

I saw psexec that is good if my web server is Windows (while its Linux right now). Also I found winexe, but not any tutorial, or even a simple example to call from PHP and have a successful connection to remote Windows Server.

Mohammad Naji
  • 5,372
  • 10
  • 54
  • 79
  • There are millions of examples about remote procedure calls out there on google. – arkascha Nov 09 '13 at 12:40
  • Easiest is to offer the commands as web service on the remote system and use that web service from the local system. – arkascha Nov 09 '13 at 12:40
  • Thank you @arkascha. Do you mean searching something like 'active directory web service' or 'active directory management web service'? – Mohammad Naji Nov 09 '13 at 12:47
  • What? Why 'active directory'? Where does LDAP come into play here? No, I mean offer the commands you want to execute on the remote system as a web service. Then it is extremely easy to call those remotely, since you can do that by a simple http request. This is called a "web service". – arkascha Nov 09 '13 at 13:21
  • 1
    Another option may be to install powershell server on the windows machine. Then you can execute powershell commands on the windows server via SSH. See http://www.powershellserver.com/ – mti2935 Nov 09 '13 at 17:22

0 Answers0