PowerShell Language Reference (Add-Member)

[ KiXtart  VBScript  Batch  AutoIt  HTA  PowerShell  Windows Command Lines  Other Command Line Utilities  ]


Add-Member  (cmdlet)

Available from version 1 through the latest release.

Syntax
Add-Member [-memberType] {<AliasProperty> | <CodeProperty> | <Property> | <NoteProperty> | <ScriptProperty> | <Properties> | <PropertySet> | <Method> | <CodeMethod> | <ScriptMethod> | <Methods> | <ParameterizedProperty>

Description
Adds a user-defined custom member to an instance of a Windows PowerShell object.

Remarks
It lets you add the following types of members: AliasProperty, CodeProperty, NoteProperty, ScriptProperty,PropertySet,CodeMethod,MemberSet and ScriptMethod. You set the initial value of the member by using the Value parameter. In the case of AliasProperty, ScriptProperty, CodeProperty and CodeMethod, you can supply additional information by using the SecondValue parameter.
    
The additional members are added to the particular instance of the object that you pipe to add-member or specify using the InputObject parameter. The additional member is only available while that instance exists. You can use the Export-Clixml cmdlet to save the instance, including the additional members, to a file. The information stored in that file can be used by the Import-Clixml cmdlet to recreate the instance of the object.

For more information, type: "get-help Add-Member -detailed".

For technical information, type: "get-help Add-Member -full".

Also see:
Get-Member  Export-CLIXML  Import-CLIXML  


 
Microsoft (built-in help)
 
Have a correction, addition or suggestion on this? Please let us know!
Last Edited: 10/29/2006. This page has been viewed 2394 times. Unless otherwise specified, all information is (C) 2004-2007 iTripoli, Inc. All Rights Reserved.

Note: you can view this information right within ASE by right clicking any keyword and selecting "Help..."



iTripoli prides itself on providing top notch customer service

Find answers or open a ticket to ask directly, when opening a ticket we will suggest relavant articles to help you get answers as quickly and accurately as possible. Visit our support center now!

Please visit our full support center to find answers quickly or submit questions or feedback.