This topic has not yet been rated - Rate this topic

ScriptBlock Members

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Represents a precompiled block of script text that can be used as a single unit.

The following tables list the members exposed by the ScriptBlock type.

  Name Description
  ScriptBlock  
Top
  Name Description
public property Attributes Gets the attributes of the script block.
public property File Gets the file where the script block is defined. This property is introduced in Windows PowerShell 2.0.
public property IsFilter Gets and sets a Boolean value that indicates whether the script block is a filter.
public property IsWorkflow  
public property Module Gets information about the module where the script block is defined. This property is introduced in Windows PowerShell 2.0.
public property StartPosition Gets the token that indicates the starting position of the script block.This property is introduced in Windows PowerShell 2.0.
Top
(see also Protected Methods)
 NameDescription
public methodToString  (Inherited from Object)
public methodEquals  (Inherited from Object)
public methodGetHashCode  (Inherited from Object)
public methodGetType  (Inherited from Object)
public methodCheckRestrictedLanguage 
public methodstaticCreateCreates a new ScriptBlock object that contains the specified script. This method is introduced in Windows PowerShell 2.0.
public methodGetNewClosureRetrieves a script block that is bound to a module. This method is introduced in Windows PowerShell 2.0.
public methodGetPowerShell 
public methodGetPowerShell 
public methodGetPowerShellRetrieves a PowerShell object that represents the pipeline of the script block. This method is introduced in Windows PowerShell 2.0.
public methodGetSteppablePipelineRetrieves a pipeline that can be used to change how a cmdlet process its input records. This method is introduced in Windows PowerShell 2.0.
public methodGetSteppablePipelineRetrieves a pipeline whose commands behave based on a specified command origin. This method is introduced in Windows PowerShell 2.0.
public methodInvokeInvokes the script block with the specified arguments, returning the results as PSObject objects.
public methodInvokeReturnAsIsRuns the script block with the specified arguments. This method returns the raw (unwrapped) result objects so that it can be more efficient.
Top
  Name Description
protected method Finalize  (Inherited from Object)
protected method MemberwiseClone  (Inherited from Object)
Top

Send comments about this topic to Microsoft.
Did you find this helpful?
(1500 characters remaining)