Difference Between PowerShell window and Command Prompt

PowerShell window and Command Prompt

At the beginning of the arrival of Windows 7, maybe we know there is something new to write commands besides the Command Prompt, namely PowerShell. PowerShell is much more powerful and good compared to Command Prompt, director can use better programming language. Also, it seems that Command Prompt has lost out to other operating system shells like Linux and Unix. However PowerShell can compete well with other shells.


Then what is the difference between PowerShell and Command Prompt?

PowerShell is very different from the Command Prompt, using a different command line known as a cmdlet. Many system management tasks can set the register to WMI (Windows Management Instrumentation), while Command Prompt cannot handle this.

PowerShell uses pipes like Linux and Unix do, pipes that let you pass output from one cmdlet to another input cmdlet, uses multiple cmdlets to insert other cmdlets, uses multiple cmdlets on a series of command lines to manipulate data. 

Unlike Unix which can only use pipes for letters or text, PowerShell can also use pipes for objects. PowerShell is not only a shell, it can also be used to write scripts to make it easier to manage Windows systems than using the Command Prompt.

Although Command Prompt is basically just a copy of various DOS commands, you can operate all DOS commands in it. In short, the Command Prompt is very limited, let alone to access the Windows management system, plus the ability of commands that are not complicated and so on.


So when is PowerShell used?

If you are a regular Windows user and use the Command Prompt to ping, you don't need to use PowerShell. You can use PowerShell to do much more than that.


Examples of PowerShell Commands and Command Prompt

Many Command Prompt commands can be run in PowerShell , from ipconfig to cd. This is because PowerShell uses "aliases" which pass the old commands in the new cmdlets. Here's the command prompt in PowerShell and Command Prompt:


Change folder or directory

Do: cd

PowerShell : Set-location


Bring up a list of files in a folder

Dos: dir

PowerShell : Get-ChildItem


Rename file

Dos: rename

PowerShell : Rename-Item


To be able to see the aliases that DOS has accepted in PowerShell, you can use Get-Alias. For example, if you write Get-Alias cd , PowerShell will tell you that cd can be run with the Set-Location cmdlet.

Leave a Comment ()