transformations:powershell
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
transformations:powershell [2018/01/11 20:58] – dmitry | transformations:powershell [2021/07/17 16:26] (current) – craigt | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== PowerShell | + | {{ transformations: |
+ | ====== | ||
+ | Category: Workflow / External\\ | ||
- | Category: Workflow / External. | + | \\ |
+ | =====Description===== | ||
+ | This action allows executing PowerShell commands and scripts from within EasyMorph. PowerShell 3.0 or above is required. | ||
- | This transformation allows executing | + | \\ |
+ | =====Use cases===== | ||
+ | PowerShell | ||
- | It is possible to send values of column to the executed PowerShell commands through the built-in **$input** variable in PowerShell, for instance: | + | EasyMorph actions can effectively be inserted into PowerShell command pipelines (e.g. generate a list of files in EasyMorph, filter it using EasyMorph expressions, |
+ | |||
+ | Finally, it becomes possible to write custom cmdlets (e.g. in C#) and run them from EasyMorph using EasyMorph parameters or column data. | ||
+ | |||
+ | \\ | ||
+ | =====Action settings===== | ||
+ | ^ Setting | ||
+ | |Input pipeline\\ (accessible via $input)|Select the input pipeline, if any. Options: | ||
+ | |Commands< | ||
+ | |Output and errors|Select whether output and errors will be captured by EasyMorph. | ||
+ | < | ||
+ | |||
+ | \\ | ||
+ | =====Remarks===== | ||
+ | It is possible to send values of a column to the executed PowerShell commands through the built-in **$input** variable in PowerShell, for instance: | ||
$input | Sort-Object | $input | Sort-Object | ||
Line 11: | Line 31: | ||
Note that **$input** is an enumerator for the sequence, not the sequence itself. | Note that **$input** is an enumerator for the sequence, not the sequence itself. | ||
+ | \\ | ||
It is possible to insert EasyMorph parameters right into the script text. Just insert parameter names in curly braces. For instance: | It is possible to insert EasyMorph parameters right into the script text. Just insert parameter names in curly braces. For instance: | ||
Copy-Item " | Copy-Item " | ||
- | It' | + | \\ |
+ | It is also possible to capture the output sequence from the PowerShell script back to EasyMorph. Note that the output sequence should be explicitly converted in the PowerShell script into a sequence of basic types such as //string//, // | ||
- | **See also** | + | \\ |
- | * Blog: [[http://blog.easymorph.com/ | + | =====Community examples===== |
+ | | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | |||
+ | \\ | ||
+ | =====See also===== | ||
* [[transformations: | * [[transformations: | ||
- | * [[https:// | + | * Blog: [[http:// |
+ | * Microsoft documentation: |
transformations/powershell.1515722290.txt.gz · Last modified: 2018/01/11 20:58 by dmitry