PowerShell ISE vs cmd.exe

Status
Not open for further replies.
G

Guest

Guest
I've been scripting exclusively in Powershell for 2 months. I'll never go back to vbscript nor cscript.
 

joeman42

Distinguished
Dec 8, 2008
33
0
18,580
0
Does the world need yet another scripting language? I don't see anything particularly unique or compelling in PowerShell. It may be "cleaner" and more elegant than vb/ecma script, but that is because it is newer and has not had the need to accumulate the extensions and baggage of the others. Cmd.exe is sufficient for simple tasks and for more involved work I prefer to use something much less platform specific, Python.
 

Parrdacc

Distinguished
Jun 30, 2008
391
0
18,930
0
I like Powershell in the fact that Microsoft really needed something like this for a long while. Bash is great. I just think its funny after all these years M$ is finally "starting" to take ques from others on how to go about doing things, I'll be it by adding their own little "touch" to it.
 
G

Guest

Guest
I could use cscript in cmd to run vbscript. So what's the advantage again?
 

FlairFan

Distinguished
Nov 13, 2009
1
0
18,510
0
I'm a perl programmer from way back (even evangelizing it to the NT folks back when I was still a *nix guy) and have pretty much left it behind. "Does the world need another scripting language?" Maybe not, but WINDOWS sure as **it does. Perhaps 'shell' is where folks are getting hung up. It is an interactive shell (like ksh, bash, etc.) but it's also like Perl, PHP, javascript, etc.

It's the OBJECT PIPELINE that raises PowerShell above the others.
 

hellwig

Distinguished
May 29, 2008
817
0
18,930
1
$Webby = new-Object -comObject InternetExplorer.Application
# $Webby |gm
$Webby.navigate("www.computerperformance.co.uk/powershell/")
$Webby.visible = $true
Haha, yes, much simpler than
c:\> start iexplore.exe "http://www.dummies.com/store/Computers-Internet/Operating-Systems/Windows.html"

Much. I'm sure powershell has plenty of wonderful attributes, but launching applications isn't one of them.
 

Parrdacc

Distinguished
Jun 30, 2008
391
0
18,930
0
[citation][nom]dedhorse[/nom]"Albeit," not "I'll be it" .[/citation]

Oh not you too! What is it with all the grammar cops on this lately? Granted that was a pretty bad one :).
 
G

Guest

Guest
@joeman42

You can do things in PowerShell with a fraction of the code it takes in VB, especially if you get in the habit of making your functions be pipeline functions. The scripting language itself is like only 15 keywords vs, VB's 130 or so. You don't need any more than the 15 key words, because of the power of accessing everything as an object, the power of the pipelining, and being able to access .NET objects. Also, anything you do in a script can be done in realtime in the shell... so you can test bits of code as you go.

It's actually superior to Bash scripting, IMO. It's Bash scripting on steroids (for Windows).
 

matt87_50

Distinguished
Mar 23, 2009
599
0
18,930
0
I love it being called bash. I don't why it's called that, probably for this reason.

all I can imagine is "... ... oh, come on ... what? why not?? COME THE F#&K ON! YOU ****ING ****! WHY won't you WORK!? ... ARGAFEWF@R$#2#$@#%! ... Oh thank God, Finally! there, was that good for you? you useless Piece of SHIT!"

to be fair I've never really used bash, but if cmd was called bash, that 'd be the reason.
 

randomizer

Distinguished
Moderator
Jul 24, 2006
880
0
19,260
62
Actually, Bash means Bourne-Again Shell, being based off the old Bourne shell. Personally, I think getting angry at a bunch of text says something about the sanity of the user.
 
G

Guest

Guest
To launch a program, you can use ii (Invoke-Item). E.g., to launch a command prompt, type 'ii cmd.exe'.
 

tmike

Distinguished
Jul 25, 2006
64
0
18,580
0
Was this article really supposed to make someone want to use powershell? Je ne think-so pas. I see that in the time since I last examined it, powershell has become no less a fustercluck than it was then.

As for bash, its fans are those who have only been exposed to UNIX via Linux and its lamed-down hacked-up shells. bash is as sorry a substitute for ksh93 as Linux is for UNIX.

 
G

Guest

Guest
@hellwig
this is also possible in PowerShell, as it is a shell you can just start programs directly, this example was about using COM.

iexplore.exe "http://www.dummies.com/store/Computers-Internet/Operating-Systems/Windows.html"
 

jb9876

Distinguished
Nov 16, 2009
1
0
18,510
0
I think some are missing the point of PowerShell.
1. Its more then a shell, it has a language.
2. Windows needs it.
3. Like flairflan said above, "It's an OBJECT PIPELINE".
4. It was designed to work in the Windows world, thus very different requirements then *nix shells. For example, needs to talk to Objects without having to convert to text and back.
5. Used concepts from prior scripting languages, even Perl.
6. Built into latest Windows OS. So admin scripting is doable.
7. It's actually very expressive and easy to learn.
8. Good books on it already.
9. It is not perfect. What is?


 

TwoDigital

Distinguished
Jan 2, 2008
137
0
18,630
0
How about a native 32-bit or 64-bit BASH shell with true redirection? I agree that powershell scripting is kind of cool, but if I were to replace cmd.exe I'd want to replace it with Cygwin BASH with xterm and fg/bg process switching.
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
G Streaming Video & TVs 8

ASK THE COMMUNITY