I want to execute windows command on remote windows machine from linux terminal.
Highly recommend PsExec, its made by Mark Russinovich, so you know it works..
Utilities like Telnet and remote control programs like Symantec's PC Anywhere let you execute programs on remote systems, but they can be a pain to set up and require that you install client software on the remote systems that you wish to access. PsExec is a light-weight telnet-replacement that lets you execute processes on other systems, complete with full interactivity for console applications, without having to manually install client software. PsExec's most powerful uses include launching interactive command-prompts on remote systems and remote-enabling tools like IpConfig that otherwise do not have the ability to show information about remote systems.
Just because M$ annexed him.. doesn't sniff make him a sell-out..
Detail by Mark: http://windowsitpro.com/systems-management/psexec
Matter of fact, anyone who has to use a MS system should have a copy of the Sysinternals Suite on hand: http://technet.microsoft.com/en-us/sysinternals/default
The easiest way would be to install cygwin on the Windows machine and install ssh server. There is a lot of howto's for example this
I have used rdesktop http://www.rdesktop.org/ to RDP to Windows systems from a Linux system. It has worked very well for me.
Sorry, you are looking for winexe.
Winexe remotely executes commands on Windows NT/2000/XP/2003 systems from GNU/Linux (and possibly also from other Unices capable of building the Samba 4 software package).