CmdID

CmdID / PowerShell / Cmdlets / Import

Import-Alias

Imports an alias list from a file. PowerShell reference

From the PowerShell reference 7 parameters Alias ipal

Opens CmdID with your command, read as PowerShell. It is read in your browser and sent nowhere.

What it does

from the PowerShell reference, CC BY 4.0

Imports an alias list from a file. The Import-Alias cmdlet imports an alias list from a file. Beginning in Windows PowerShell 3.0, as a security feature, Import-Alias does not overwrite existing aliases by default. To overwrite an existing alias, after assuring that the contents of the alias file is safe, use the Force parameter.

Import-Alias [-Path] <String> [-Scope <String>] [-PassThru] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
Import-Alias -LiteralPath <String> [-Scope <String>] [-PassThru] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Import aliases from a file

Import-Alias test.txtIdentify

Get a list of defined aliases and their options

Get-Alias | Select-Object Name, OptionsIdentify

Its page in the reference: Import-Alias.

Parameters

7 in the PowerShell reference
-ForceAllows the cmdlet to import an alias that is already defined or is read only.
-LiteralPathSpecifies the path to a file that includes exported alias information. Unlike the Path parameter, the value of the LiteralPath parameter is used exactly as it is typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences.
-PassThruReturns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
-PathSpecifies the path to a file that includes exported alias information. Wildcards are allowed but they must resolve to a single name.
-ScopeSpecifies the scope into which the aliases are imported. The acceptable values for this parameter are: - Global - Local - Script - A number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent) The default is Local. For more information, see about_Scopes.
-ConfirmPrompts you for confirmation before running the cmdlet.
-WhatIfShows what would happen if the cmdlet runs. The cmdlet is not run.