Powershell小技巧之获取变量列表
2016-08-01
27
我们的需求是当想要列出脚本中所有变量。这里定义了一个函数 Get-Variable:复制代码 代码如下:function Get-Variable{ $token = $null $errors = $null $ast = [System.Management.Automation.Language.Parser]::ParseInput($psise.CurrentFile.Editor.Text, [ref] $token, [ref] $err...