PSActivity.PrepareSession(ActivityImplementationContext) Method

Definition

The method for derived activities to customize the runspace of a System.Management.Automation.PowerShell instance that the runtime has prepared for them. If the command needs any workflow-specific information during this PrepareSession call, it should be stored in ActivityImplementationContext.WorkflowContext during the GetCommand preparation phase.

C++
protected:
 virtual void PrepareSession(Microsoft::PowerShell::Activities::ActivityImplementationContext ^ implementationContext);

Parameters

implementationContext
ActivityImplementationContext

The ActivityImplementationContext returned by the call to GetCommand.

Applies to

Производ Верзије
Windows PowerShell 5.1.0.0