ICommandRuntime Interface

This interface is used when you are calling the Invoke to explicitly invoke a cmdlet from within another cmdlet. It provides a mechanism for overriding the behavior of the methods called by the cmdlet you are invoking, such as the ShouldProcess and WriteObject methods.


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

'Usage
Dim instance As ICommandRuntime

public interface ICommandRuntime
public interface ICommandRuntime
public interface ICommandRuntime

All calls to the cmdlet APIs are routed through to an instance of this interface. When cmdlets are called directly from the command line or by a host application, the Windows PowerShell runtime uses the default implementation of the interface. When cmdlets are called from within another cmdlet, you can use the default implementation, or pass a custom implementation to the Cmdlet.Invoke method, allowing you to change the behavior of the methods called by the cmdlet you are invoking.


 

Target Platforms

Windows Developer Preview, Windows Server Developer Preview

Send comments about this topic to Microsoft.
Show:
© 2014 Microsoft