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.

CommandCollection Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Represents a collection of Command objects. This class cannot be inherited.

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

System.Object
  System.Collections.ObjectModel.Collection(Of T)
    System.Management.Automation.Runspaces.CommandCollection

Public NotInheritable Class CommandCollection
	Inherits Collection(Of Command)

NameDescription
System_CAPS_pubpropertyCount

(Inherited from Collection(Of T).)

System_CAPS_pubpropertyItem(Int32)

(Inherited from Collection(Of T).)

NameDescription
System_CAPS_pubmethodAdd(T)

(Inherited from Collection(Of T).)

System_CAPS_pubmethodAdd(String)

Adds a command to the collection.

System_CAPS_pubmethodAddScript(String)

Adds a script to the collection of commands. This string can contain any piece of Windows PowerShell code, such as "$x = 1".

System_CAPS_pubmethodAddScript(String, Boolean)

Adds a script to the collection of commands along with a Boolean value that indicates that the script should be invoked within a new local scope.

System_CAPS_pubmethodClear()

(Inherited from Collection(Of T).)

System_CAPS_pubmethodContains(T)

(Inherited from Collection(Of T).)

System_CAPS_pubmethodCopyTo(T(), Int32)

(Inherited from Collection(Of T).)

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodGetEnumerator()

(Inherited from Collection(Of T).)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIndexOf(T)

(Inherited from Collection(Of T).)

System_CAPS_pubmethodInsert(Int32, T)

(Inherited from Collection(Of T).)

System_CAPS_pubmethodRemove(T)

(Inherited from Collection(Of T).)

System_CAPS_pubmethodRemoveAt(Int32)

(Inherited from Collection(Of T).)

System_CAPS_pubmethodToString()

(Inherited from Object.)

This collection is accessed through the Commands property.

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: