#!/bin/bash equivalent in windows / specify interpreter for executable script IN the script #!/bin/bash equivalent in windows / specify interpreter for executable script IN the script powershell powershell

#!/bin/bash equivalent in windows / specify interpreter for executable script IN the script


In Windows the file extension specifies, which programs is used to Interpret a script.You can also specify the Interpreter like "cmd": CMD /c "c:\temp\script.cmd" or with Powershell: powershell.exe script.ps1

What you can do (in Powershell) is, to specify the Version, which is used to run the script. Use #Requires -version 3.0 in first line and it will throw error on v4 cmdlets etc.