Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Why Another Scripting Language?

Reply
 
Old 11-13-2007   #1 (permalink)
Stephen Wood


 
 

Why Another Scripting Language?

I've seen this question bandied about, but I haven't seen an answer. Why did
Microsoft decide to publish a brand new scripting language rather than simply
using one of the .NET languages? For example, why not just design PowerShell
an interpreter for C#?

Thanks,

Stephen



My System SpecsSystem Spec
Old 11-13-2007   #2 (permalink)
Brandon Shell [MVP]


 
 

Re: Why Another Scripting Language?

They server two very distinct purposes.

Powershell is more than just a scripting langauge, actually I would argue
that is the least of its capiabilities. Powershell is a paradigm shift in
admin practices. Its like the revolution of object based langauges, but on
the shell level. C# is not intuitive for an admin. Powershell is. The idea
isnt to convert everyone on the planet to developers. They object it is provide
tools that are easy to use and geared to the end user.

Brandon Shell
---------------
Blog: http://www.bsonposh.com/
PSH Scripts Project: www.codeplex.com/psobject

SW> I've seen this question bandied about, but I haven't seen an answer.
SW> Why did Microsoft decide to publish a brand new scripting language
SW> rather than simply using one of the .NET languages? For example,
SW> why not just design PowerShell an interpreter for C#?
SW>
SW> Thanks,
SW>
SW> Stephen
SW>


My System SpecsSystem Spec
Old 11-13-2007   #3 (permalink)
Darren Mar-Elia


 
 

Re: Why Another Scripting Language?

I'm sure there are lots of opinions about this, but what I see as both a
PowerShell and C# developer, is that PowerShell is/was geared towards a
completely different audience. I'm not sure that taking a full-blow
programming language, and exposing it through a command-line interpreter,
meets the requirements of Windows systems administrators. As long as I've
been in this business, scripting has been hard for sysadmins, who are
typically pressed on time, don't have a dev background and need quick and
simple ways to accomplish tasks. This is especially true in Windows
environments because we've grown so used to GUIs as the way of accomplishing
most tasks. That's why I think the verb-noun construct of PowerShell is so
attractive to administrators and why just porting C# to the command-line
would have been a big mistake.

--
Darren Mar-Elia
MS-MVP-Windows Server--Group Policy

Script Group Policy Settings with the GPExpert Scripting Toolkit for
PowerShell!
Find out more at http://www.sdmsoftware.com/products2.php

Visit the GPOGUY: http://www.gpoguy.com -- The Windows Group Policy
Information Hub:
FAQs, Training Videos, Whitepapers and Utilities for all things Group
Policy-related




"Stephen Wood" <StephenWood@xxxxxx> wrote in message
news:5E99E89D-274A-4CF6-9D28-1460B0161751@xxxxxx
Quote:

> I've seen this question bandied about, but I haven't seen an answer. Why
> did
> Microsoft decide to publish a brand new scripting language rather than
> simply
> using one of the .NET languages? For example, why not just design
> PowerShell
> an interpreter for C#?
>
> Thanks,
>
> Stephen
>
>
My System SpecsSystem Spec
Old 11-13-2007   #4 (permalink)
Brandon Shell [MVP]


 
 

Re: Why Another Scripting Language?

wow... I fail spelling and grammar

I did actually spell check that, but rdpclip bug strikes again!

Brandon Shell
---------------
Blog: http://www.bsonposh.com/
PSH Scripts Project: www.codeplex.com/psobject

BS> They server two very distinct purposes.
BS>
BS> Powershell is more than just a scripting langauge, actually I would
BS> argue that is the least of its capiabilities. Powershell is a
BS> paradigm shift in admin practices. Its like the revolution of object
BS> based langauges, but on the shell level. C# is not intuitive for an
BS> admin. Powershell is. The idea isnt to convert everyone on the
BS> planet to developers. They object it is provide tools that are easy
BS> to use and geared to the end user.
BS>
BS> Brandon Shell
BS> ---------------
BS> Blog: http://www.bsonposh.com/
BS> PSH Scripts Project: www.codeplex.com/psobject
SW>> I've seen this question bandied about, but I haven't seen an
SW>> answer. Why did Microsoft decide to publish a brand new scripting
SW>> language rather than simply using one of the .NET languages? For
SW>> example, why not just design PowerShell an interpreter for C#?
SW>>
SW>> Thanks,
SW>>
SW>> Stephen
SW>>


My System SpecsSystem Spec
Old 11-14-2007   #5 (permalink)
Thomas Lee


 
 

Re: Why Another Scripting Language?

In message <5E99E89D-274A-4CF6-9D28-1460B0161751@xxxxxx>, Stephen
Wood <StephenWood@xxxxxx> writes
Quote:

>I've seen this question bandied about, but I haven't seen an answer. Why did
>Microsoft decide to publish a brand new scripting language rather than simply
>using one of the .NET languages? For example, why not just design PowerShell
>an interpreter for C#?
You've had some answers already, but...

1. PowerShell is interpretative, while C# and VBS are in effect
compiled. You can try things out, make simple changes then cut/paste
into a script. With C# this is not so simple.

2. PowerShell is focused on the admin experience, so things like
formatting are defaulted. This helps the admin to get the right answer
without having to know how to do all the formatting.

3. PowerShell provides a richer admin expereince - you can grab .NET,
COM and WMI objects with ease, and not have to worry much about the
details.

My .02€ worth.

--
Thomas Lee
doctordns@xxxxxx
MVP - Admin Frameworks and Security
My System SpecsSystem Spec
Old 11-15-2007   #6 (permalink)
Karl Prosser[MVP]


 
 

Re: Why Another Scripting Language?

1) C# doesn't have a pipeline, so you can't string together streams of
different commands and get them to work
2) C# takes alot of support structure code, so you can do the quick
things you can do in PS.. there wouldn't be so many of the famous one liners
3) C# isn't following patterns, so you cant do like like -whatif,
-confirm etc, as any scripter would have to implement this themselves,
and thus they would do it each differently, which brings us to a final point
4) consistancy, powershell has a high level of consistency which gives
good economics to the scripter, admin ,and even third party
snapin/cmdlet developer.


Stephen Wood wrote:
Quote:

> I've seen this question bandied about, but I haven't seen an answer. Why did
> Microsoft decide to publish a brand new scripting language rather than simply
> using one of the .NET languages? For example, why not just design PowerShell
> an interpreter for C#?
>
> Thanks,
>
> Stephen
>
>
My System SpecsSystem Spec
Old 11-15-2007   #7 (permalink)
mikes.net


 
 

Re: Why Another Scripting Language?

On Nov 13, 11:59 am, Stephen Wood
<StephenW...@xxxxxx> wrote:
Quote:

> I've seen this question bandied about, but I haven't seen an answer. Why did
> Microsoft decide to publish a brand new scripting language rather than simply
> using one of the .NET languages? For example, why not just design PowerShell
> an interpreter for C#?
>
> Thanks,
>
> Stephen
I think Powershell *is* the interpreted version of C#. C# is so
unfunctional, and so unsmart about types, that if you were to set out
to make it functional and flexible enough for the command line, and
your target audience was sys admins, you'd end up with something like
Powershell.

The problem is for programmers, because programmers are also sys
admins. We need it all. Which is why F# intrigues me. It's a real
language, both functional and imperative, and very type smart, out of
the box.

CmdLets and Verb-Nouns are good ideas, but have nothing to do with
Powershell per se. Any language could do similar things.

Mike
My System SpecsSystem Spec
Old 11-18-2007   #8 (permalink)
Al Dunbar


 
 

Re: Why Another Scripting Language?


"mikes.net" <michael.net@xxxxxx> wrote in message
news:f9b7bdb0-48f2-45ce-be65-fb33647ba6ba@xxxxxx
Quote:

> On Nov 13, 11:59 am, Stephen Wood
> <StephenW...@xxxxxx> wrote:
Quote:

>> I've seen this question bandied about, but I haven't seen an answer. Why
>> did
>> Microsoft decide to publish a brand new scripting language rather than
>> simply
>> using one of the .NET languages? For example, why not just design
>> PowerShell
>> an interpreter for C#?
My guess is that they wanted a fresh start so they would not have to deal
with known or perceived limitations of existing programming systems. I also
suspect that it would have been quite difficult to produce a C# interpreter
in a form that was: a) interactive, and: b) strongly object-oriented.
Quote:
Quote:

>>
>> Thanks,
>>
>> Stephen
>
> I think Powershell *is* the interpreted version of C#. C# is so
> unfunctional, and so unsmart about types, that if you were to set out
> to make it functional and flexible enough for the command line, and
> your target audience was sys admins, you'd end up with something like
> Powershell.
>
> The problem is for programmers, because programmers are also sys
> admins. We need it all. Which is why F# intrigues me. It's a real
> language, both functional and imperative, and very type smart, out of
> the box.
>
> CmdLets and Verb-Nouns are good ideas, but have nothing to do with
> Powershell per se. Any language could do similar things.
Name one language that actually does something similar.

/Al


My System SpecsSystem Spec
Old 11-19-2007   #9 (permalink)
Hal Rottenberg


 
 

Re: Why Another Scripting Language?

mikes.net wrote:
Quote:

> The problem is for programmers, because programmers are also sys
> admins.
As a system administrator who supports programmers, I have to formally disagree
here.

--

Hal Rottenberg
Blog: http://halr9000.com
Webmaster, Psi (http://psi-im.org)
Co-host, PowerScripting Podcast (http://powerscripting.net)
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
which is powerful scripting language VB Script
VB scripting help VB Script
UAC and scripting Vista General
i don't have my language on installed input language Vista General
Scripting bug? PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46