Powershell小技巧之查找脚本中的函数

上传:michaelbyron 浏览: 18 推荐: 0 文件:PDF 大小:34.45KB 上传时间:2021-01-17 01:37:48 版权申诉
要快速获取你PS脚本库中所有文件的函数名,你可以这样做: 代码如下: filter Find-Function { $path = $_.FullName $lastwrite = $_.LastWriteTime $text = Get-Content -Path $path if ($text.Length -gt 0) { $token = $null $errors = $null $ast = [System.Management.Automation.Language.Parser]::P
上传资源
用户评论