Bloque de guiones de PowerShell
# How to create your own Invoke commandlet function
function Invoke-MyOwnCommand {
param (
[System.Management.Automation.ScriptBlock]$ScriptBlock = $null
)
&$ScriptBlock
}
# Usage
Invoke-MyOwnCommand -ScriptBlock {Get-Process}
Flemish Druid