Adds a user-defined custom member to an object.
Snap-In: Microsoft.PowerShell.Utility
Syntax:
Add-Member
[-MemberType] <PSMemberTypes> [-Name] <String> [ [-Value] <Object>] [ [-SecondValue] <Object>] -InputObject <PSObject> [-Force] [-PassThru] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>]
Description:
Adds a user-defined custom member to an object. The Add-Member Cmdlet takes an Input object and adds to it one of the following user-defined member types: AliasProperty, CodeProperty, Property, NoteProperty, ScriptProperty, PropertySet, Method, CodeMethod, MemberSet, ScriptMethod Add-Member takes any arbitrary InputObject and outputs the noted object with the added member types. If the InputObjetc has N types, the output, OutputObject, will have N+1 types.