Alex Rivera | Logout

Why would I use Powershell over C#?

Asked 2009-05-26T07:52:27.587
20

I know that Powershell is quite powerful in that it is a scripting language in which you have access to the entire .Net framework (thats all I know about it). But i'm struggling to understand what's the big hype about Powershell when I could use C# to code the exact same thing?

Edit
Report

2 Answers

3
  • It's not a compiled language.
  • It has a plugin ecosystem with lots of 'libraries' for doing various domain specific things like copying files, playing with AD, Exchange.
  • It's the right tool for a different, slightly overlapping set of jobs.
  • It's a lot more powerful and consistent than CMD.EXE and other things evolved from command shells that needed to fit into 8K RAM.

And why are you using C# anyway, ILASM can do everything with much more control, and you're just calling stuff in the BCL anyway.

answered 2009-05-26T08:01:31.857
2

I generalized your question into the following:

Why would I use (higher level language that I know little about) over (lower level language I know more about)?

The point of a higher level language is to abstract common tasks so that they are faster to write. Many people who ask this question cannot conceive of this benefit of a higher level language because they are already comfortable with their lower level language.

In the end, it all comes down to your willingness to learn the abstractions of a higher level language in hopes that you can become as proficient in it as the lower one.

answered 2009-05-26T08:31:54.713

Your Answer