Includes Files
Includes Files or Functions into a Script.
EXAMPLE 1
{
[Include("Invoke-PipeScript")]$null
} | .>PipeScriptEXAMPLE 2
{
[Include("Invoke-PipeScript")]
param()
} | .>PipeScriptEXAMPLE 3
{
[Include('*-*.ps1')]$psScriptRoot
} | .>PipeScriptEXAMPLE 4
{
[Include('https://pssvg.start-automating.com/Examples/PowerShellChevron.svg')]$PSChevron
} | .>PipeScriptThe File Path to Include
| Type | Required | Position | PipelineInput | Aliases |
|---|---|---|---|---|
[String] |
false | 1 | false | FullName Uri Url |
If set, will include the content as a byte array
| Type | Required | Position | PipelineInput |
|---|---|---|---|
[Switch] |
false | named | false |
If set, will pass thru the included item
| Type | Required | Position | PipelineInput |
|---|---|---|---|
[Switch] |
false | named | false |
The exclusion pattern to use.
| Type | Required | Position | PipelineInput | Aliases |
|---|---|---|---|---|
[String[]] |
false | named | false | ExcludePattern |
The variable that include will be applied to. If including files with wildcards, this will be the base path. Otherwise, this variable will be assigned to the included value.
| Type | Required | Position | PipelineInput |
|---|---|---|---|
[VariableExpressionAst] |
true | named | true (ByValue) |
The CommandAST. This is provided by the transpiler when include is used as a keyword.
| Type | Required | Position | PipelineInput |
|---|---|---|---|
[CommandAst] |
true | named | true (ByValue) |
Include [[-FilePath] <String>] [-AsByte] [-Passthru] [-Exclude <String[]>] -CommandAst <CommandAst> [<CommonParameters>]Include [-FilePath] <String> [-AsByte] [-Passthru] [-Exclude <String[]>] -VariableAst <VariableExpressionAst> [<CommonParameters>]