How to execute Linux shell script from Windows Power Shell script.

Is there way to execute shell script on Linux Box from Windows Power shell script?
Who is Participating?
I'm going to go out on a limb here and say natively you can't execute PowerShell on a Linux box. power shell is a subsystem for Windows. You may be able to do this with some 3rd party software but not natively.
here is a link to show you how to install PowerShell on Linux machines l
Dr. KlahnPrincipal Software EngineerCommented:
Is there way to execute shell script on Linux Box from Windows Power shell script?

We need some more information, because as I read the question the situation either can't occur or is unlikely.

There's a linux-based computer.  It's running a Powershell script, which is possible but seems unlikely - it would require at least linux Powershell Core.  The script is a Windows Powershell script, which probably wouldn't run on linux properly if it was written for Windows Powershell.  And the desired result is to run a linux shell script from out of the Powershell script.

Can that be the situation?  Would you give us some more information on the setup and the desired result?

linux ain't windows.  In Rome it's best to do as the Romans do, i.e., on linux, use the native scripting.
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

There are several examples

Your Windows system needs a command line ssh application,
Setup the connection to the Linux system
Execute the command '/full/path/to/script' or run a sequence of commands.
the question is a request on scripting a Windows host to connect to a Linux system and run a Linux, existing script.
Powershell on the Windows host is the preferred scripting tool the asker is interested in using.
I am not reading into the question that the user wants to run a powershell script within the Linux server environment, though Microsoft has links/references on installing powershell interpreter on the various platforms Linux as well as a Apple's, Mac OS X
1. install ssh client at your windows box
2. Create ssh key via command "ssh-keygen" at your windows box, it will generate two file: id_rsa,, open and copy all lines
3. login into your Linux box via ssh client, please remember save server key info when connect to you Linux server first time, and edit the ~/.ssh/authorized_keys(create if not exists), append or input the text into it.
4. now your can run Linux script at Linux box in power shell window like:
ssh linux_box_user_name@linux_box_server_ip "linux command"
nociSoftware EngineerCommented:
I 2nd the SSH option.
All Courses

From novice to tech pro — start learning today.