Jump to content



Photo

Windows 8: cmd or Powershell?


  • Please log in to reply
47 replies to this topic

Poll: cmd vs Powershell

This is a public poll. Other members will be able to see which options you chose

Which would you like to see in Windows 8?

You cannot see the results of the poll until you have voted. Please login and cast your vote to see the results of this poll.
Vote Guests cannot vote

#16 +Brando212

Brando212

    Neowinian Senior

  • Tech Issues Solved: 17
  • Joined: 15-April 10
  • Location: Omaha, NE
  • OS: Windows 8.1
  • Phone: Sony Xperia ZL, Nokia Lumia 925

Posted 30 October 2011 - 18:07


You invoke cmd to ping? I just do Windows+R and then ping from the run prompt.

but then you don't get to see the results as it just closes right away 0_o


#17 surrealvortex

surrealvortex

    Neowinian

  • Joined: 15-June 07

Posted 30 October 2011 - 18:09

By default, it waits 1 second between each ping and it pings 4 times, right?

#18 OP htcz

htcz

    Neowinian Senior

  • Joined: 22-July 11

Posted 30 October 2011 - 19:38

I dont know how to use powershell so cmd.

Then use it just like to use cmd :) No difference at all.

#19 Aethec

Aethec

    Neowinian Senior

  • Joined: 02-May 10

Posted 30 October 2011 - 19:51

It seems many people here don't understand what CMD is.

Short explanation: CMD is a console window that provides basic functionality for changing the current directory (cd), showing the files and folders (dir) and a few other things (copy, auto-completion, command history...). The most important thing it does is to enable you to open files, give arguments to executables, and provide input and output for console applications.

What you're doing by calling "robocopy C:\SomeFolder C:\SomeOtherFolder" is launching robocopy.exe using "C:\SomeFolder" and "C:\SomeOtherFolder" as parameters. "tree C:\" just calls tree.com with "C:\" as a parameter. "ping google.com" calls ping.exe with "google.com" as parameter. And so on.
These programs (not commands - check your C:\Windows\System32 folder) can be used exactly the same way in PowerShell, and their output will look exactly the same.
In fact, if Microsoft set the default background color to black in PowerShell and removed the "PS" at the beginning of each line, most people wouldn't notice the difference. You would still be able to use the programs you use now.

#20 Kreuger

Kreuger

    Neowin's Local Grouch

  • Joined: 29-December 03
  • Location: Ontario, Canada

Posted 30 October 2011 - 19:51

I want bash

#21 Joey S

Joey S

    Neowinian

  • Joined: 23-September 11

Posted 30 October 2011 - 20:01

Bash terminal.

cmd and Powershell are like kids toys by comparison

#22 Taranaich

Taranaich

    Neowinian

  • Joined: 30-October 11

Posted 30 October 2011 - 20:42

I want bash

So install Bash. You can do that.

cmd and Powershell are like kids toys by comparison

Cmd maybe, but don't think you've actually tried PowerShell or you wouldn't be saying that. It's quite powerful. Bash is good yes,but looking over what Bash has built in, nothing really jumps out as being something that others can't do or just doesn't apply.. most of it's goodies come from external programs or scripting languages, most of which are available to other shells.

#23 ThePitt

ThePitt

    Neowinian Senior

  • Joined: 14-January 06
  • Location: Hell

Posted 30 October 2011 - 20:53

wtf is powershell?

#24 pupdawg21

pupdawg21

    Neowinian

  • Joined: 16-June 09

Posted 30 October 2011 - 21:20

Powershell is NOT a replacement for CMD and ALL commands do not work in the same manner or using the same syntax in the 2 environments. Many of the most commonly used ones do however.

#25 n4cer

n4cer

    Neowinian

  • Joined: 28-May 03

Posted 30 October 2011 - 22:15

cmd can't be removed as it would break existing scripts and applications that call cmd.
Though PowerShell has aliases for many cmd built-in commands, the cmdlets for which the aliases are mapped do not support the switches of the cmd commands (e.g., you can't do "dir /w" in PowerShell). Variable syntax is also different (e.g., %windir% in cmd vs $env:windir in PowerShell).

PowerShell is getting ever increasing usage as the underpinning for Windows administration and troubleshooting functionality. While it should see greater exposure, such as adding it to the Ribbon and the context menu ("Open PowerShell here"), cmd should not be removed to elevate PowerShell unless the use cases for cmd are covered by PowerShell. It's not like cmd is the only shell besides PowerShell that currently ships with Windows. Its presence doesn't diminish PowerShell.

#26 PGHammer

PGHammer

    Neowinian Senior

  • Tech Issues Solved: 1
  • Joined: 31-August 03
  • Location: Accokeek, MD
  • OS: Windows 8 Pro with Media Center x64

Posted 30 October 2011 - 23:33

cmd can't be removed as it would break existing scripts and applications that call cmd.
Though PowerShell has aliases for many cmd built-in commands, the cmdlets for which the aliases are mapped do not support the switches of the cmd commands (e.g., you can't do "dir /w" in PowerShell). Variable syntax is also different (e.g., %windir% in cmd vs $env:windir in PowerShell).

PowerShell is getting ever increasing usage as the underpinning for Windows administration and troubleshooting functionality. While it should see greater exposure, such as adding it to the Ribbon and the context menu ("Open PowerShell here"), cmd should not be removed to elevate PowerShell unless the use cases for cmd are covered by PowerShell. It's not like cmd is the only shell besides PowerShell that currently ships with Windows. Its presence doesn't diminish PowerShell.


Nor is it meant to.

Add-on command shells have existed for NT-based flavors of Windows from the beginning (two of the more well-known were the Hamilton C Shell, a straight-up port of the Bourne Again Shell (bash) to NT, and 4NT (and 4NT alternative TakeCommand) from JP Software) - PowerShell isn't meant to take away from that. (Bash certainly hasn't taken away the usefulness of other shells anywhere else - including Linux distributions, MacOS, or even UNIX, where bash began.) The reason, in fact, for the popularity of bash as a shell is the fact that the same commands are usable regardless of the underlying OS. PowerShell, unlike bash, is designed expressly for Windows - it's far from OS-neutral. Most of the documentation for PowerShell is on the *server* side of Windows (that is despite the reality that PowerShell is usable by Windows 7 today) - generally, unless you have a niche usage that PowerShell fits, you likely won't be running PowerShell on Windows 7 (though you certainly can).

#27 Kreuger

Kreuger

    Neowin's Local Grouch

  • Joined: 29-December 03
  • Location: Ontario, Canada

Posted 30 October 2011 - 23:44

So install Bash. You can do that.

It's okay. I dont use the CLI when Im on Windows. It's just my preference in Linux :p

#28 PGHammer

PGHammer

    Neowinian Senior

  • Tech Issues Solved: 1
  • Joined: 31-August 03
  • Location: Accokeek, MD
  • OS: Windows 8 Pro with Media Center x64

Posted 31 October 2011 - 00:05

So install Bash. You can do that.


Cmd maybe, but don't think you've actually tried PowerShell or you wouldn't be saying that. It's quite powerful. Bash is good yes,but looking over what Bash has built in, nothing really jumps out as being something that others can't do or just doesn't apply.. most of it's goodies come from external programs or scripting languages, most of which are available to other shells.


True. The very attraction of bash is that it is OS-neutral - it works the same regardless of the underlying operating system. (Have we forgotten one of the very first NT CMD alternatives, the Hamilton C Shell? It was, in fact, a direct port of bash (which stands for the Bourne Again Shell, which itself was a fork of ash) to NT 3.1/9x. The Hamilton C Shell was one of my favorite *jaw-dropper* programs during the Windows 95 beta, because it was an NT program that ran *untouched/unaltered* on 9x.) Most CMD alternatives (including PowerShell) are designed to fill in niches.

#29 bruNo_

bruNo_

    "Who are you and why should I care?"

  • Joined: 08-May 07
  • Location: São Paulo, Brazil

Posted 31 October 2011 - 00:28

Why invoke cmd just to ping an asset?

And the link you posted to........is that really a reason to use cmd over Powershell? :rolleyes: come on....


Let me ask you a question. You made a poll here, right? Then you ask everyone's opinion, when someone gives it you just come with all your love for Powershell. I know the differences between CMD and Powershell and that's why I posted my goddamn opinion.

#30 Melfster

Melfster

    Neowinian Senior

  • Joined: 04-August 05

Posted 31 October 2011 - 00:39

I don't think really think people understand what powershell is. In some ways its more powerful then bash and other ways its more awkward. But I do think it really is getting better/ more powerful with each version. In Windows 8 server powershell knowledge looks like it almost most know.