NAME
Import-Alias
SYNOPSIS
Imports an Alias list from a file.
SYNTAX
Import-Alias [-Path] <string> [-Force] [-PassThru] [-Scope <string>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Import-Alias cmdlet imports an Alias list from a file.
PARAMETERS
-Force [<SwitchParameter>]
Allows the cmdlet to import an Alias that is already defined and is read only. You can use the following command to display information about the currently-defined Aliases:
Get-Alias | Select-Object name,Options
The value of the Options property will include “ReadOnly” if the corresponding Alias is read only.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Returns an object representing the Alias. By default, this cmdlet does not generate any output.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Path <string>
Specifies the path to a file that includes exported Alias information. Wildcards are allowed but they must resolve to a single name.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Scope <string>
Specifies the scope into which the Aliases are imported. Valid values are “Global”, “Local”, or “Script”, or a number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent). “Local” is the default. For more information, see about_scopes.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before executing the command.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Describes what would happen if you executed the command without actually executing the command.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
“Get-Help about_CommonParameters“.
INPUTS
System.String
You can pipe a string that contains a path to Import-Alias.
OUTPUTS
None or System.Management.Automation.AliasInfo
When you use the Passthru parameter, Import-Alias returns a System.Management.Automation.AliasInfo object that represents the Alias. Otherwise, this cmdlet does not generate any output.
NOTES
————————– EXAMPLE 1 ————————–
C:\PS>Import-Alias test.txt
Description
———–
This command imports Alias information from a file named test.txt.
RELATED LINKS
Online version: http://go.microsoft.com/fwlink/?LinkID=113339
Export-Alias
Get-Alias
New-Alias
Set-Alias