windows powershell vs cmd

CMD vs Powershell

Questions:

  1. Does powershell support all commands as cmd.exe does?
  2. How do I quickly start PowerShell? (something like Windows-Key + R -> cmd)
  3. Is there any case where I would favor cmd over powershell?

Anwser

  1. Yes, you can mostly use all the external commands that you would use in cmd much the same way in Powershell and Powershell has equivalents for cmd internal commands like dir. And of course Powershell comes with whole lot of cmdlets and the power of the .Net framework.
  2. If you are on Windows 7, pin it to your taskbar and use Win + Position to start. Or just press Winkey, type powershell ( mostly it is even shorter) in the start menu and hit enter. Win + R -> powershell would work as well.
  3. You might have to prefer cmd when running some batch / cmd files which may not run fine in Powershell ( but I would say, better write a powershell script to do the same.). Since I have started using powershell, I have never had the need to use cmd. And of course, you can always do cmd /c command from Powershell.

powershell vs bash

PowerShell basically is a playground for a .NET developer and Microsoft System Administrator. It’s very focused on system administration and tasks for Microsoft systems, not much for the individual workstation.

It is much heavier than cmd.exe, that’s why we need both.

Advantages

  • Object-Oriented
  • .NET Objects and Forms supported
  • More Functions compared to cmd.exe and VBScript.
  • More Extensible via cmdlets, plugins.
  • Background Jobs

Bash is mostly not worth comparing to PowerShell, because Bash is mostly text-based and not object-based, and so you are sorting in a different way by delimiters, by position, by regular expressions and not by individual objects properties.

A good trick is the win + position(1/2/3…etc) to launch the programs in the taskbar.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s