ScriptBlock Members
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Top
Top
Top
System.Management.Automation Namespace
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 |
| Name | Description | |
|---|---|---|
|
Attributes | Gets the attributes of the script block. |
|
File | Gets the file where the script block is defined. This property is introduced in Windows PowerShell 2.0. |
|
IsFilter | Gets and sets a Boolean value that indicates whether the script block is a filter. |
|
IsWorkflow | |
|
Module | Gets information about the module where the script block is defined. This property is introduced in Windows PowerShell 2.0. |
|
StartPosition | Gets the token that indicates the starting position of the script block.This property is introduced in Windows PowerShell 2.0. |
(see also Protected Methods)
Top
| Name | Description | |
|---|---|---|
![]() | ToString | (Inherited from Object) |
![]() | Equals | (Inherited from Object) |
![]() | GetHashCode | (Inherited from Object) |
![]() | GetType | (Inherited from Object) |
![]() | CheckRestrictedLanguage | |
![]() ![]() | Create | Creates a new ScriptBlock object that contains the specified script. This method is introduced in Windows PowerShell 2.0. |
![]() | GetNewClosure | Retrieves a script block that is bound to a module. This method is introduced in Windows PowerShell 2.0. |
![]() | GetPowerShell | |
![]() | GetPowerShell | |
![]() | GetPowerShell | Retrieves a PowerShell object that represents the pipeline of the script block. This method is introduced in Windows PowerShell 2.0. |
![]() | GetSteppablePipeline | Retrieves a pipeline that can be used to change how a cmdlet process its input records. This method is introduced in Windows PowerShell 2.0. |
![]() | GetSteppablePipeline | Retrieves a pipeline whose commands behave based on a specified command origin. This method is introduced in Windows PowerShell 2.0. |
![]() | Invoke | Invokes the script block with the specified arguments, returning the results as PSObject objects. |
![]() | InvokeReturnAsIs | Runs the script block with the specified arguments. This method returns the raw (unwrapped) result objects so that it can be more efficient. |
| Name | Description | |
|---|---|---|
|
Finalize | (Inherited from Object) |
|
MemberwiseClone | (Inherited from Object) |
Reference
ScriptBlock ClassSystem.Management.Automation Namespace
Other Resources
Windows PowerShell SDKSend comments about this topic to Microsoft.

