external help file | Module Name | online version | schema |
---|---|---|---|
PSFunctionTools-help.xml |
PSFunctionTools |
2.0.0 |
Identify the names of PowerShell functions in a PowerShell script file.
Get-FunctionName [-Path] <String> [-All] [-Detailed] [<CommonParameters>]
When exporting functions from files, you may only want to export specific functions. Which you can do if you know the name. Use Get-FunctionName to identify the names of functions. The default behavior is to get names of functions that follow the verb-noun naming convention.
PS C:\> Get-FunctionName C:\scripts\MyInternetTools.psm1
Get-MyWhoIs
Get-GeoIP
Get-MyPublicIP
Get-MyWeather
Get-WeatherByProxy
Get-WeatherLocation
Get-QOTD
Get-ZipInfo
Get-RSSFeed
Open-URL
Get the names of all standard functions in the specified file.
PS C:\> Get-FunctionName C:\scripts\MyInternetTools.psm1 -All
_log
_parseOutput
Get-MyWhoIs
Get-GeoIP
Get-MyPublicIP
Get-MyWeather
Get-WeatherByProxy
Get-WeatherLocation
Get-QOTD
Get-ZipInfo
Get-RSSFeed
Open-URL
Get the names of all functions in the specified file regardless of naming convention.
PS C:\> Get-FunctionName C:\scripts\Convert-FunctionToFile.ps1 -Detailed
Path: C:\scripts\Convert-FunctionToFile.ps1
Name
----
Export-FunctionFromFile
Get-FunctionAlias
Get-FunctionName
Test-FunctionName
Get detailed output from the command which includes the path to source file.
List all detected function names regardless of naming convention.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify the .ps1 or .psm1 file with defined functions.
Type: String
Parameter Sets: (All)
Aliases: pspath
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Write a rich detailed object to the pipeline.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/