external help file | Module Name | online version | schema |
---|---|---|---|
PSFunctionTools-help.xml |
PSFunctionTools |
2.0.0 |
Get a defined function alias.
Get-FunctionAlias [-Path] <String> [<CommonParameters>]
Get-FunctionAlias is a tool you can use in your scripting automation. It will extract function names and aliases from a PowerShell script file. The source must be a .ps1 or .psm1 file. The command will only idenfity aliases defined as part of the function using code like [alias('foo')].
PS C:\> Get-FunctionAlias -Path C:\scripts\SQLBackup.psm1
Name Alias
---- -----
Backup-SQLDatabase Backup-SQL
Restore-SQLdatabase rsql
Get functions and aliases from the specified file.
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 (ByPropertyName)
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.