Search notes:

PowerShell cmdLets: New-Alias and Set-Alias

new-alias creates a new alias, set-alias overwrites an existing alias or, if it doesn't exist, creates a new alias.
new-alias throws an error if the alias to be created already exists.
function a-function-with-a-long-and-complicated-name {
   param (
      [int] $i
   )

   $i * $i
}

#
#  Create alias for function
#
new-alias square a-function-with-a-long-and-complicated-name

#
#  Use alias to invoke function
#
square 5

See also

Powershell command noun: alias

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1745381667, '160.79.110.241', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/PowerShell/command-inventory/noun/alias/new_set/index(58): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78