< Back
Remove-PSFAlias
Post
NAME Remove-PSFAlias
SYNOPSIS
Removes an alias from the global scope.
SYNTAX
Remove-PSFAlias [-Name] <String[]> [-Force] [<CommonParameters>]
DESCRIPTION
Removes an alias from the global* scope.
Please note that this always affects the global scope and should not be used lightly.
This has the potential to break code that does not comply with PowerShell best practices and relies on the use of
aliases.
Refuses to delete constant aliases.
Requires the '-Force' parameter to delete ReadOnly aliases.
*This includes aliases exported by modules.
PARAMETERS
-Name <String[]>
The name of the alias to remove.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Force [<SwitchParameter>]
Enforce removal of aliases. Required to remove ReadOnly aliases (including default aliases such as "select" or
"group").
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Remove-PSFAlias -Name 'grep'
Removes the global alias 'grep'
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Remove-PSFAlias -Name 'select' -Force
Removes the default alias 'select'
RELATED LINKS
SYNOPSIS
Removes an alias from the global scope.
SYNTAX
Remove-PSFAlias [-Name] <String[]> [-Force] [<CommonParameters>]
DESCRIPTION
Removes an alias from the global* scope.
Please note that this always affects the global scope and should not be used lightly.
This has the potential to break code that does not comply with PowerShell best practices and relies on the use of
aliases.
Refuses to delete constant aliases.
Requires the '-Force' parameter to delete ReadOnly aliases.
*This includes aliases exported by modules.
PARAMETERS
-Name <String[]>
The name of the alias to remove.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Force [<SwitchParameter>]
Enforce removal of aliases. Required to remove ReadOnly aliases (including default aliases such as "select" or
"group").
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Remove-PSFAlias -Name 'grep'
Removes the global alias 'grep'
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Remove-PSFAlias -Name 'select' -Force
Removes the default alias 'select'
RELATED LINKS