Skip to content

Instantly share code, notes, and snippets.

@IISResetMe
Last active September 15, 2021 07:43
Show Gist options
  • Save IISResetMe/75a16fe7dc40934d3fb4 to your computer and use it in GitHub Desktop.
Save IISResetMe/75a16fe7dc40934d3fb4 to your computer and use it in GitHub Desktop.

Revisions

  1. IISResetMe revised this gist May 18, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion passfunc.ps1
    Original file line number Diff line number Diff line change
    @@ -11,5 +11,5 @@ function Reverse-String {

    Invoke-Command {
    param($string,$func)
    $func.Invoke($string)
    [scriptblock]::Create($func).Invoke($string)
    } -ArgumentList "abc",${function:Reverse-String}
  2. IISResetMe created this gist May 18, 2015.
    15 changes: 15 additions & 0 deletions passfunc.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    function Reverse-String {
    param(
    [string]$instr
    )

    $chars = $instr.ToCharArray()

    [array]::Reverse($chars)
    $chars -join ""
    }

    Invoke-Command {
    param($string,$func)
    $func.Invoke($string)
    } -ArgumentList "abc",${function:Reverse-String}