Why are there multiple types of command line interfaces in windows rather than just one? Command prompt, Powershell etc.

673 views

Why are there multiple types of command line interfaces in windows rather than just one? Command prompt, Powershell etc.

In: Technology

3 Answers

Anonymous 0 Comments

Powershell is the NEW command prompt.

Cmd really only lets you run – from a dos prompt – the applications in your path (environment variable) or in the local folder which you normally could run by finding the executable in Windows Explorer.
You can “script” cmd by using batch files, but DOS/Windows .bat file syntax essentially is just what you could type line by line in a cmd window, nothing more. In order to interact with files, system parameters, registry values or running applications you’d have to write a cmd executable program to do so.

Powershell on the other hand does everything cmd does, but includes support for plugins and scripting – if you like, its very similar to a UNIX/Linux style “shell” – it can launch programs, interact with running programs, can be scripted and provides APIs to maniupulate files, parse file contents etc.

if you ever find yourself cursing while you attempt to troubleshoot a complex .bat file, seriously look into Powershell scripting. So much nicer.

You are viewing 1 out of 3 answers, click here to view all answers.