PSListModifier Generic Class
Collapse the table of content
Expand the table of content

PSListModifier Generic Class

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)

Dim instance As PSListModifier(Of T)

public class PSListModifier<T> : PSListModifier



The type of the list element.

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


Get-Mailbox –mailbox <PSListModifier[string]>


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.


Target Platforms

© 2015 Microsoft