PowerShell函数当做变量传递给另一个函数

function fts($a,$b){
$sum=$a+$b
Write-Host $sum
}


function hs($fun,$a,$b){
$c = 32
#调用函数
Invoke-Command $fun -ArgumentList $a,$c


}

#函数hs调用fts函数 hs
${function:fts} 33 22
原文地址:https://www.cnblogs.com/dreamer-fish/p/13427453.html