Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

APPENDIX B: Developing at a Command Prompt > Work with Objects in PowerShell

Work with Objects in PowerShell

Objects can be a tough concept to understand. However, I find that it's easier to understand them if you think of a problem first in English and then translate it to code.

Step away from the code for a minute, and think about the computer you're currently working with. Maybe you're working on a multiprocessor server with a lot of memory. It could be manufactured by Dell, IBM, Apple, or someone else. Perhaps it is part of a domain. If I were to ask you to describe your current machine to me, you probably could give me information like that.

In that exercise, your computer is considered an object. All of the other things I suggested — manufacturer, number of processors, amount of memory, whether it's on a domain — tell me more about your computer. These can be considered properties. Basically, objects have properties.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial