Click to Rate and Give Feedback
TechNet
TechNet Library
Scripting
Windows Powershell
Introducing Windows PowerShell

Published: May 20, 2009

Updated: February 29, 2012

Applies To: Windows PowerShell 2.0, Windows PowerShell 3.0

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Most shells, including Cmd.exe and the SH, KSH, CSH, and BASH UNIX shells, operate by executing a command or utility in a new process, and presenting the results to the user as text. Over the years, many text processing utilities, such as sed, AWK, and PERL, have evolved to support this interaction.

These shells also have commands that are built into the shell and run in the shell process, such as the typeset command in KSH and the dir command in Cmd.exe. In most shells, because there are few built-in commands, many utilities have been created.

Windows PowerShell is very different.

  • Windows PowerShell does not process text. Instead, it processes objects based on the .NET Framework platform.

  • Windows PowerShell comes with a large set of built-in commands with a consistent interface.

  • All shell commands use the same command parser, instead of different parsers for each tool. This makes it much easier to learn how to use each command.

Best of all, you do not have to give up the tools that you have become accustomed to using. You can still use the traditional Windows tools, such as Net, SC, and Reg.exe in Windows PowerShell.

This section includes the following topics:



Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Programming Knowledge      Hossein.A   |   Edit   |   Show History
Off course you need programming knowledge. Windows PowerShell has its own programming language.

Yes; You can google-it and copy paste the script. But, to really understand the code and be able to extend it, you need programming knowledge. But, the learning curve is much less than C#, VB.NET.
I know what "text" is, but ...      DeSoto2011 ... Scott M.   |   Edit   |   Show History

"Windows PowerShell does not process text. Instead, it processes objects based on the .NET Framework platform."

OK.

"Text" I understand.

But "objects based on the .NET Framework platform"? Sounds like a lot to learn before one can do anything with PowerShell?

And then a couple of pages later, it says, "You can also capture the text that Windows programs generate and use that text in Windows PowerShell".

So it "does not process text", except it does.

Scott M:

PowerShell is an "object-oriented" command line tool. When the help says that it doesn't process "text", it means that arbitrary command names that have embedded functionality attached to them are not supported. Instead, PowerShell uses objects from the .NET Framework as the core "type" (rather than text) that is processed. This is beneficial because the .NET Framework has many thousands of objects that can perform a vast array of tasks, so this "shell" is more "power"full than others because it has a much larger functionality base.

Also, "capturing" text is not the same as "processing" text. Capturing text is done with String objects. The text itself is benign. If the text was "Format C:" it would not actually be "processed" as it would with cmd.exe. Instead the string of characters are stored for use somewhere else.

Tags What's this?: Add a tag
Flag as ContentBug
It depends!      Thomas Lee   |   Edit   |   Show History
At one level, you can use PowerShell by just typing in a few commands - I have met many Exchange/Lync admins who just need to do a few things with PowerShell. For them, no programming skills are needed - they can just google, type (and retype!) and are finished with their work.

Of course, to make full use of PowerShell as an automation tool, knoweldge of .NET and programming is fairly important. Dealing with loops, doing different things based on circumstances, handling errors, etc all require some level of programming skill.

My .02€ worth.
Powershell requires programming experience      Matt Neerincx [MSFT]   |   Edit   |   Show History
I'm a very experienced programmer (C++, C#, Java, etc...) and Powershell is just another programming language, I don't understand the "no need for programming experience" claim. I found Powershell language is very difficult to understand language when starting, so expect to spend alot of time learning the language at first. Powershell has many arcane usage of operators that is hard to understand and you can't easily do a full text search for the operators. Best bet is get a Powershell for dummies book and start from there if you find it confusing. Also, the Powershell language has changed quite a bit over time so be sure to get the latest "Powershell for dummies" book otherwise you will be learning the older syntax which is harder to use than the latest syntax.
Tags What's this?: Add a tag
Flag as ContentBug
Programming may not be essential, but...      Keybonesabi   |   Edit   |   Show History
Programming may not be essential, but there has to be some sort of CLI knowledge, right?
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker