Skip to content

Instantly share code, notes, and snippets.

@turboBasic
Created December 20, 2017 17:17
Show Gist options
  • Save turboBasic/1cdb82b662e4728d2a4a70d481fd5ebb to your computer and use it in GitHub Desktop.
Save turboBasic/1cdb82b662e4728d2a4a70d481fd5ebb to your computer and use it in GitHub Desktop.
Returns names of all Powershell functions declared in file paths
function Find-Function {
[CmdletBinding()]
Param(
[Parameter( Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName )]
[Object[]]
[Alias( 'FullName' )]
$Path
)
BEGIN {}
PROCESS
{
Find-Path -path $Path -ExcludeDirectory |
ForEach-Object {
Find-FunctionSimple -Text (Get-Content $_ -raw)
}
}
END {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment