Skip to content

Commit

Permalink
feat: Exporting and mounting Splatter ( Fixes #39, Fixes #40, Fixes #41
Browse files Browse the repository at this point in the history
…, Fixes #42 )

Using PipeScript to build the module
  • Loading branch information
StartAutomating authored and StartAutomating committed Sep 6, 2024
1 parent 5d2033d commit 3e5ea62
Showing 1 changed file with 4 additions and 75 deletions.
79 changes: 4 additions & 75 deletions docs/Use-Splat.md
Original file line number Diff line number Diff line change
@@ -1,169 +1,98 @@
Use-Splat
---------




### Synopsis
Uses a splat.



---


### Description

Uses a splat to call a command.
If passed from Find-Splat,Get-Splat or Test-Splat, the command will be automatically detected.
If called as .@, this will run only provided commands
If called as *@, this will run any found commands



---


### Related Links
* [Get-Splat](Get-Splat.md)



* [Find-Splat](Find-Splat.md)



* [Test-Splat](Test-Splat.md)





---


### Examples
#### EXAMPLE 1
> EXAMPLE 1
```PowerShell
@{id=$pid} | Use-Splat gps # When calling Use-Splat is globally imported
```
> EXAMPLE 2
#### EXAMPLE 2
```PowerShell
@{id=$pid} | & ${.@} gps # When calling Use-Splat is nested
```
> EXAMPLE 3
#### EXAMPLE 3
```PowerShell
@{LogName='System';InstanceId=43,44},
@{LogName='Application';InstanceId=10000,10005} |
.@ Get-EventLog # get a bunch of different log events
```



---


### Parameters
#### **Command**

One or more commands






|Type |Required|Position|PipelineInput|
|--------------|--------|--------|-------------|
|`[PSObject[]]`|false |1 |false |



#### **ArgumentList**

Any additional positional arguments that would be passed to the command






|Type |Required|Position|PipelineInput|
|--------------|--------|--------|-------------|
|`[PSObject[]]`|false |2 |false |



#### **Splat**

The splat






|Type |Required|Position|PipelineInput |
|--------------|--------|--------|--------------|
|`[PSObject[]]`|false |named |true (ByValue)|



#### **Force**

If set, will run regardless of if parameters map, are valid, and have enough mandatory parameters.






|Type |Required|Position|PipelineInput|
|----------|--------|--------|-------------|
|`[Switch]`|false |named |false |



#### **Best**

If set, will run the best fit out of multiple commands.
The best fit is the command that will use the most of the input splat.






|Type |Required|Position|PipelineInput|Aliases |
|----------|--------|--------|-------------|------------------------------------------|
|`[Switch]`|false |named |false |BestFit<br/>BestFitFunction<br/>BF<br/>BFF|



#### **Stream**

If set, will stream input into a single pipeline of each command.
The non-pipeable parameters of the first input splat will be used to start the pipeline.
By default, a command will be run once per input splat.






|Type |Required|Position|PipelineInput|Aliases|
|----------|--------|--------|-------------|-------|
|`[Switch]`|false |named |false |Pipe |





---


### Syntax
```PowerShell
Use-Splat [[-Command] <PSObject[]>] [[-ArgumentList] <PSObject[]>] [-Splat <PSObject[]>] [-Force] [-Best] [-Stream] [<CommonParameters>]
Expand Down

0 comments on commit 3e5ea62

Please sign in to comment.