Linux is easy with ssh to execute a command on another system. But if the other system is Windows not allways ssh is possible. What is the best way on Ubuntu 19 to solve this problem? I know winexe or psexec but I dont find a way to use or install it. And samba don't have the possibility to execute a windows command. Can an expert give me an answer to this problem? I say thanks a lot just now.


You can try to use powershell remotely, but it's not the classic cmd. In ubuntu 19.04 you can install powershell with snap. If you are interested, search commands of powershell and look this link to execute remotely powersell.


  • 1
    Powershell is available via PPA and is available for all releases according to microsoft (docs.microsoft.com/en-us/powershell/scripting/install/…). I didn't find any in Ubuntu repos (packages.ubuntu.com/…) – guiverc Sep 3 '19 at 9:20
  • Well, Powershell is available on Ubuntu but it does not has the functions for remote access. Have I done anything wrong? – StefanP Sep 4 '19 at 7:26
  • Some times you need to enable remote access of powershell in your "server". With 'Enable-PsRemoting -Force' you enable in your server the remote. – Guim Sep 4 '19 at 7:31
  • The installed version of Powershell don't supply the command Enable-PsRemoting? Against Windows much less commands are available? Can I fix this? – StefanP Sep 6 '19 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.