Is it possible to run a command on windows server from Linux?
I want to restore a sqlserver db backup on remote windows server from linux. I tired "net rpc" but there is nothing for execute a command or script on remote server.
Check out winexe - it depends on samba, uses RPC to run remote commands and might even come with your distribution's packages.
Edit: even if your distro does not have it precompiled and you do not want to compile yourself, you should check out the Build Service - it is likely to have the binary version you would need for your system.
As others have suggested elsewhere, you can setup an ssh server on the win box with cygwin and run .bat or .cmd files remotely that way.
You haven't really described what you want done or how often you want it done.
If what you want done is repetitive and parameterizable you can use the age old solution of creating a daemon on the remote server that periodically checks for file entries in a shared directory, where the file entries contain the parameters for the script. That's how print servers and many other daemons first worked. If you do it that way then regular old windows scheduled tasks, batch files, and shared directories will take you far.
The modern version (and perhaps much more overkill) of that of course is to create a simple webserver on the windows machine that performs your db restore task whenever someone requests the appropriate url.
You can start the Telnet service on the Windows server and then run the command through a Telnet session.