Run Shell script in Windows 10

Yes we can use Woindows 10 for execution of bash script. You need to change following things to make it enabled.

Go to windows10 settings > Update & Security
1) Got to For Developers and choose Developer Mode
2) In search bar Search for Windows Features. Click Turn Windows feature on and off
Check windows sub system for linux and reboot the machine when prompted.

After reboot open browser and hit https://aka.ms/wslstore will open store and install ubuntu.

Ubuntu is free, after login you can install Ubuntu side by side.

Now store a shell file given below to your desktop with .sh file extension. Example : test.sh

#! /bin/bash

echo "Hello World"

Then go to terminal or cmd or powershell of windows and run the code like below.

C:\Users\username\Desktop> bash index.sh
Hello World

So you need to write bash before the shell file and it will execute and return the value.