那我们来看看在PowerShell自定义函数中,如何创建这样一个开关参数。 function Test-Ping { param ( [Switch] $t ) if ($t) { Write-Host '一直ping' }
確定! 回上一頁