Skip to content

Commit be3bf1c

Browse files
StartAutomatingStartAutomating
authored andcommitted
Updating Invoke-PipeScript.md [skip ci]
1 parent ea7e37a commit be3bf1c

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed

docs/Invoke-PipeScript.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
2+
Invoke-PipeScript
3+
-----------------
4+
### Synopsis
5+
Invokes PipeScript or PowerShell ScriptBlocks, commands, and syntax.
6+
7+
---
8+
### Description
9+
10+
Runs PipeScript.
11+
12+
Invoke-PipeScript can run any PowerShell or PipeScript ScriptBlock or Command.
13+
14+
Invoke-PipeScript can accept any -InputObject, -Parameter(s), and -ArgumentList.
15+
16+
These will be passed down to the underlying command.
17+
18+
Invoke-PipeScript can also use a number of Abstract Syntax Tree elements as command input:
19+
20+
|AST Type |Description |
21+
|-------------------------|---------------------------------------|
22+
|AttributeAST |Runs Attributes |
23+
|TypeConstraintAST |Runs Type Constraints |
24+
|InvokeMemberExpressionAst|Runs Member Invocation Expressions |
25+
26+
---
27+
### Related Links
28+
* [Update-PipeScript](Update-PipeScript.md)
29+
---
30+
### Parameters
31+
#### **InputObject**
32+
33+
The input object. This will be piped into the underlying command.
34+
If no -Command is provided and -InputObject is a [ScriptBlock]
35+
36+
37+
38+
|Type |Requried|Postion|PipelineInput |
39+
|----------------|--------|-------|--------------|
40+
|```[PSObject]```|false |named |true (ByValue)|
41+
---
42+
#### **Command**
43+
44+
The Command that will be run.
45+
46+
47+
48+
|Type |Requried|Postion|PipelineInput|
49+
|----------------|--------|-------|-------------|
50+
|```[PSObject]```|false |1 |false |
51+
---
52+
#### **Parameter**
53+
54+
A collection of named parameters. These will be directly passed to the underlying script.
55+
56+
57+
58+
|Type |Requried|Postion|PipelineInput|
59+
|-------------------|--------|-------|-------------|
60+
|```[IDictionary]```|false |named |false |
61+
---
62+
#### **ArgumentList**
63+
64+
A list of positional arguments. These will be directly passed to the underlying script or command.
65+
66+
67+
68+
|Type |Requried|Postion|PipelineInput|
69+
|------------------|--------|-------|-------------|
70+
|```[PSObject[]]```|false |named |false |
71+
---
72+
#### **SafeScriptBlockAttributeEvaluation**
73+
74+
If this is not set, when a transpiler's parameters do not take a [ScriptBlock], ScriptBlock values will be evaluated.
75+
This can be a very useful capability, because it can enable dynamic transpilation.
76+
If this is set, will make ScriptBlockAst values will be run within data language, which significantly limits their capabilities.
77+
78+
79+
80+
|Type |Requried|Postion|PipelineInput|
81+
|--------------|--------|-------|-------------|
82+
|```[Switch]```|false |named |false |
83+
---
84+
### Syntax
85+
```PowerShell
86+
Invoke-PipeScript [-InputObject <PSObject>] [[-Command] <PSObject>] [-Parameter <IDictionary>] [-ArgumentList <PSObject[]>] [-SafeScriptBlockAttributeEvaluation] [<CommonParameters>]
87+
```
88+
---
89+
90+

0 commit comments

Comments
 (0)