Objects and Pipeline in PowerShell

Why PowerShell uses objects

One of the reasons why PowerShell uses objects to represent data is that, well, you have to represent data somehow, right? PowerShell could have stored that data in a format like XML, or perhaps its creators could have decided to use plain-text tables. But they had some specific reasons why they didn’t take that route.

The first reason is that Windows itself is an object-oriented operating system—or at
least, most of the software that runs on Windows is object oriented. Choosing to structure data as a set of objects is easy, because most of the operating system lends itself to those structures.

Another reason to use objects is because they ultimately make things easier on you
and give you more power and flexibility.

The pipeline: enabling power with less typing

One of the reasons we like PowerShell so much is that it enables us to be more
effective administrators without having to write complex scripts, like we used to
have to do in VBScript. But the key to powerful one-line commands lies in the way
the PowerShell pipeline works.

댓글

이 블로그의 인기 게시물

Oracle NLS_DATE_FORMAT 변경

Stop console process using Ctrl+C.

Alternative to IValueConvert, QuickConverter