While using the Windows machine we face soo much trouble running the command line scripts on CMD(command prompt). Few commands run successfully but some are not. Why is there any difference between terminal and CMD.

  • Can you clarify, what exactly do you mean by "terminal?" Note too there is the command processor (command prompt) which can be termed "CMD" and, there are the .cmd (Batch Files) which can be termed "CMD." See EduCBA: CMD vs BAT. Feb 24, 2022 at 0:10
  • The command prompt available in software development IDE like IntelliJ, Eclipse and VS code is called terminal.
    – Rashid
    Feb 25, 2022 at 11:09
  • Thanks @Rashid. To be of any help we'd need specifics. Which "terminal" exactly is not behaving as expected and what, specifically, is the error or undesired behavior. You've tagged your question with both powershell and shell-script one is very specific, the other is general. Scripts developed for one will not likely run within the other. We need greater specificity. Feb 25, 2022 at 15:57

1 Answer 1


The question needs details, like what type of script you're attempting to run, and the specific errors you're getting.

Generally speaking, by default Windows Terminal launches a PowerShell interpreter (but can launch others), whereas cmd.exe launches a command interpreter that's much older and has no PowerShell functionality.

If you're attempting to run a PowerShell script, it needs to be in a PowerShell session (start either PowerShell, PowerShell ISE, Windows Terminal with a PowerShell tab, or if you really want to, you can run in a cmd.exe window by invoking powershell.exe -File MyScript.ps1).

If it's a batch file, either interpreter can run it.

If it's a shell script, it's most likely meant to be executed on Linux.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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