I would like to know how to do set-alias in PowerShell for the cmd used in developing Firefox extension:
cfx run -p C:\\Users\\username\\AppData\\Roaming\\Mo
In PowerShell aliases can be defined only for commands or cmdlets, not for entire commandlines with parameters:
NAME
New-Alias
SYNOPSIS
Creates a new alias.
[...]
DESCRIPTION
The New-Alias cmdlet creates a new alias in the current Windows
PowerShell session. Aliases created by using New-Alias are not
saved after you exit the session or close Windows PowerShell. You
can use the Export-Alias cmdlet to save your alias information to
a file. You can later use Import-Alias to retrieve that saved
alias information.
PARAMETERS
[...]
-Value <String>
Specifies the name of the cmdlet or command element that is
being aliased.
You'll need a custom function if you want a shorthand for running a particular command with parameters.
function cfxp {
& cfx run -p "$env:APPDATA\Mozilla\Firefox\Profiles\ripltbxm.cfxp"
}