Windows desktop applications
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PSListModifier<T> Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Provides Add, Remove, and Replace lists that can be used to update lists. This class is introduced in Windows PowerShell 2.0.

Namespace:   System.Management.Automation
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

System::Object
  System.Management.Automation::PSListModifier
    System.Management.Automation::PSListModifier<T>

generic<typename T>
public ref class PSListModifier : PSListModifier

Type Parameters

T

The type of the list element.

NameDescription
System_CAPS_pubmethodPSListModifier<T>()

Initializes a new instance of the PSListModifier<T> class that contains empty Add, Remove, and Replace lists. This constructor is introduced by Windows PowerShell 2.0.

System_CAPS_pubmethodPSListModifier<T>(Collection<Object^>^, Collection<Object^>^)

Initializes a new instance of the PSListModifier<T> class that contains Add and Remove lists that are defined by using individual collections. This constructor is introduced by Windows PowerShell 2.0.

System_CAPS_pubmethodPSListModifier<T>(Hashtable^)

Initializes a new instance of the PSListModifier<T> class that contains Add, Remove, and Replace lists that are defined by a hash table. This constructor is introduced by Windows PowerShell 2.0.

System_CAPS_pubmethodPSListModifier<T>(Object^)

Initializes a new instance of the PSListModifier<T> class that contains a Replace list based on an Object. This constructor is introduced by Windows PowerShell 2.0.

NameDescription
System_CAPS_pubpropertyAdd

Gets the Add list that is used when the ApplyTo method is called. This property is introduced in Windows PowerShell 2.0.(Inherited from PSListModifier.)

System_CAPS_pubpropertyRemove

Gets the Remove list that is used when the ApplyTo method is called. This property is introduced in Windows PowerShell 2.0.(Inherited from PSListModifier.)

System_CAPS_pubpropertyReplace

Gets the Replace list that is used to replace all the items of an existing list. This property is introduced in Windows PowerShell 2.0.(Inherited from PSListModifier.)

NameDescription
System_CAPS_pubmethodApplyTo(IList^)

Updates the specified list collection by using the current Add, Remove, and Replace lists. This method is introduced in Windows PowerShell 2.0.(Inherited from PSListModifier.)

System_CAPS_pubmethodApplyTo(Object^)

Updates the specified collection object by using the current Add, Remove, and Replace lists. This method is introduced in Windows PowerShell 2.0.(Inherited from PSListModifier.)

System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

This class is returned by the Update-List cmdlet. Other cmdlets that modify lists could also use this class to provide Add, Remove, and Replace lists.

This generic class provides a more descriptive syntax for those cmdlets that use a PSListModifier object. For example, in the following table the syntax for the command that uses the generic class (first row) explicitly indicates that a string is needed.

Class Used by Cmdlet

Syntax

PSListModifier<T>

Get-Mailbox –mailbox <PSListModifier[string]>

PSListModifier

Get-Mailbox –mailbox <PSListModifier>

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft