Structured Data
Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.
Applies to: Exchange Server 2007, Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3
Traditional command shells have always supported the redirection of the output of one command to another in the form of a textual stream. This method has its disadvantages because parsing text has to be carefully controlled, usually by some kind of encoding to prevent unexpected behavior.
Each action that you take in the Exchange Management Shell must be done within the context of objects. The Exchange Management Shell uses structured collections of information that are called objects. These objects represent items in hierarchical data sources. When you call a cmdlet, one or more strongly typed structured objects are returned. Objects carry information about an item and about the object’s structure. The object also acts as a proxy for the real item. For example, when you access a file from the Exchange Management Shell, you work with the object that represents that file, not the file itself.
The Exchange Management Shell uses this object model to pass information from one command to another by using pipelining. This avoids the problems that are caused by textual parsing in other command shells because the data that the Exchange Management Shell uses has a definite structure and is interpreted according to the object model.
For more information about pipelining, see Pipelining.
The Structure of an Object
An object consists of three types of data: the object’s type, its methods, and its properties.
Object Type
The data type of an object provides details about what kind of object it is. For example, an object that represents a mailbox is a Mailbox
object. An object that represents a file is a FileInfo
object. All objects have a distinct predefined type and namespace that the Exchange Management Shell can process.
Object Methods
A method is a set of instructions that define a particular action that you can take on an object. For example, a Mailbox
object includes the method Set_EmailAddresses
. This can be used to set the value of attribute ProxyAddresses
on Active Directory directory service mailbox-enabled user accounts.
Object Properties
A property is data that is associated with an object that specifies a particular state of that object. For example, a Mailbox
object includes the property EmailAddresses
that was mentioned in "Object Methods" earlier in this topic. This object property represents the value of the actual attribute ProxyAddresses
on mailbox-enabled Active Directory user accounts. This is the actual item that is represented by the Mailbox
object.
The information about properties that is included with an object includes the current state and the definition of each property. This includes its name and the type of data that the property can take, such as Integer
, Boolean
, String
, and so on.