PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, November 5, 2022

[FIXED] How to get Powershell to run SH scripts

 November 05, 2022     environment-variables, powershell, scripting, sh     No comments   

Issue

Can someone please tell me how I get Powershell to run .sh scripts? It keeps just trying to open the file i need in Notepad when I run this command:

.\update-version.sh 123

I've added .SH to my PATHEXT environment variable and also added the Microsoft.PowerShell_profile.ps1 directory to the Path environment variable.


Solution

PowerShell scripts have a .ps1 extension (along with other supported extensions such as psm1,psd1 etc) it will not run other extensions other than that.



Answered By - Shay Levy
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing