Chapter 8. Objects: data by another name
We’re going to do something a little different in this chapter. PowerShell’s use of objects can be one of its most confusing elements, but at the same time it’s also one of the shell’s most critical concepts, affecting everything you do in the shell. We’ve tried various explanations over the years, and we’ve settled on a couple that each work well for distinctly different audiences. If you have programming experience and are comfortable with the concept of objects, we want you to skip to section 8.2. If you don’t have a programming background, and haven’t programmed or scripted with objects before, start with section 8.1 and read straight through the chapter.
Take a second to run Get-Process in PowerShell. You should see a table with several columns, but those columns barely scratch the surface of the wealth of information available about processes. Each process object also has a machine name, a main window handle, a maximum working set size, an exit code and time, processor affinity information, and a great deal more. You’ll find more than 60 pieces of information associated with a process. Why does PowerShell show so few of them?