script, , ( , PowerShell v2):
$errors = $null
$functions = [system.management.automation.psparser]::Tokenize($psISE.CurrentFile.Editor.Text, [ref]$errors) `
| ?{(($_.Content -Eq "Function") -or ($_.Content -eq "Filter")) -and $_.Type -eq "Keyword" } `
| Select-Object @{"Name"="FunctionName"; "Expression"={
$psISE.CurrentFile.Editor.Select($_.StartLine,$_.EndColumn+1,$_.StartLine,$psISE.CurrentFile.Editor.GetLineLength($_.StartLine))
$psISE.CurrentFile.Editor.SelectedText
}
}
, v2 ISE Function Explorer. , , ISE. , . , , .
, , Export-ModuleMember!
$functions | ?{ $_.FunctionName -ne "your-excluded-function" }
PowerShell v3, .