Main article

For us non-developer types, understanding objects is like trying to understand the opposite sex. Because PowerShell leverages objects so heavily, we’re forced to figure it out. Sadly, there isn’t an Admins are from Mars and Objects are from Venus book for us to fall back on. If you haven’t already cracked the object nut, here’s an analogy to help you along:

Think of a car as an object. A car is a self-contained thing that can exist on its own. It's also not unique; millions of other instances of cars are on the road. SharePoint objects are the same. Our farm can have many objects of the type SPSite or SPDatabase. Our car object has properties that we can discover, or set about it. Examples would be color, number of tires, and number of doors. SharePoint objects have properties as well. Examples of an SPSite object’s properties are URL, Owner, and ReadOnly. Finally, our car object has actions we can do with it, called methods. Methods like start, roll down driver’s window, open hood, or drive. SPSite objects also have methods that can be executed on them, such as Delete() and Rename().