Skip to content

Latest commit

 

History

History
75 lines (48 loc) · 1.6 KB

Get-FunctionAlias.md

File metadata and controls

75 lines (48 loc) · 1.6 KB
external help file Module Name online version schema
PSFunctionTools-help.xml
PSFunctionTools
2.0.0

Get-FunctionAlias

SYNOPSIS

Get a defined function alias.

SYNTAX

Get-FunctionAlias [-Path] <String> [<CommonParameters>]

DESCRIPTION

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')].

EXAMPLES

Example 1

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.

PARAMETERS

-Path

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

PSFunctionAlias

NOTES

RELATED LINKS

Get-FunctionName

Get-FunctionAttribute