ObjectEventRegistrationBase.Action Property

Gets and sets the value of the Action parameter of the derived cmdlets. This property is introduced in Windows PowerShell 2.0.

Namespace: Microsoft.PowerShell.Commands
Assembly: System.Management.Automation (in System.Management.Automation.dll)

Dim instance As ObjectEventRegistrationBase
Dim value As ScriptBlock

value = instance.Action

instance.Action = value

public ScriptBlock Action { get; set; }
/** @property */
public ScriptBlock get_Action ()

/** @property */
public void set_Action (ScriptBlock value)

public function get Action () : ScriptBlock

public function set Action (value : ScriptBlock)

Property Value

A ScriptBlock object that contains commands that are run when the event is raised.

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