How to alias a Powershell function?

powershell

Solution

Use the `set-alias` cmdlet.

set-alias -name helloworld -value hello

It should be noted though that your function name does not follow the PowerShell convention and may be confusing to someone more accustomed to using PowerShell.

Problem

The aim is to call the function `hello` by calling `hello` or alias `helloworld` Code: ``` function hello() { param( [string] $name ) Write-Host "Hello $name!" } hello "Utrecht" helloworld "Utreg" ``` Expected outcome: ``` Hello Utrecht! Hello Utreg! ```

Original source