You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Please remove **all** built-in aliases and put them in a module #5870
Committee-ReviewedPS-Committee has reviewed this and made a decisionIssue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-ExternalThe issue is caused by external component(s).
We've suggested this before in the context of the discussion of the infamous curl alias, and in that context it was not done (although I don't remember why), so let me suggest it again now:
ALL built-in aliases should be removed from the shell.
A module should be created called "CoreAliases" which recreates all the aliases which are left in PowerShell Core when it's run on Linux or Mac OS.
Another module should be created called "CoreWindowsAliases" which builds on top of CoreAliases but adds ls and the other aliases that are currently missing on Linux and Mac OS, but not on Windows.
A third module should be created called "WindowsPowerShellAliases" which further builds on the first two to put back all of the Windows PowerShell aliases for which the commands are present in Core.
All three modules should ship in the installer (like PSReadline), so they're always present.
Then we can stop changing aliases one at a time, and never have another discussion about them.
If people want the aliases, they just import the appropriate module for their situation. If they don't, they do nothing.
Reacted by Jack Kerr, Andrew Childs, J Bilinski, mi-hol, Ilya, Tor Magnus Rakvåg, Pekka Savolainen, Roman Kuzmin 1967-2026, Chip Locke, Friedrich Weinmann and 19 more
Joel Bennett (@Jaykul) Thanks for the short and clear thought. I totally agree that the time has come and we have to complete this story that lasts two years.
Based on previous discussions we know that some users want all the Windows aliases, some ones only part, some ones do not want them at all. We have also come to the conclusion that aliases only make sense in an interactive session and should (must) be excluded from scripts.
So I see a simple solution that we can implement in steps:
Step 1. Create compatibility modules (I suggest use Compatibility- name prefix for them):
The first only aliases without conflicts (current list which we use now) (Compatibility-Aliases-DefaultSet)
The second includes all aliases from previous module and curently excluded Windows PowerShell aliases (Compatibility-Aliases-ShortWindowsSet).
The third includes all Windows PowerShell aliases (Compatibility-Aliases-FullWindowsSet).
Step 2. Import these modules only in the interactive session. We could add a new setting InteractiveOnly = $true to a module manifest. This feature will be useful for all compatibility modules and PSReadline. (Related #3956)
Step 3. Enable an user to choose which compatibility module to download or not to download at all using a configuration file (we already have powershell.config.json) and GPO. Until we implement the option users can load selected compatibility module using their profile file.
Step 4. Add an option to disable/enable aliases in scripts - enhance strict mode (run time) or/and using language aliases allow=$false statement (parse time). Add global option (to a configuration file powershell.config.json and GPO) to enable/disable aliases in scripts.
There's no need for any functionality to be added in order to remove the default aliases -- even a setting to say which module to import would be overkill when we have profile scripts.
I'm not trying to get the alias feature removed. I use aliases, and I want to keep using them. I don't want to loose the ability to change the name of commands.
I just want to clean out the defaults and give existing users an easy way to load the aliases they're used to. In an ideal world, I want to do all of that without breaking anything more, although obviously we'll need users to add the Import-Module line to their profile.
The main point is to ensure we never again break people's experience by such a silly trivial change as removing a built-in alias.
P.S. I honestly don't think you can get a new setting added to module manifests. We still don't have a setting to indicate the supported Edition or Operating System, nevermind something as meta as whether the author thinks the module should be used interactively.
Reacted by Mr Beedell, Roke Julian Lockhart and Ahmad Ben Hamad
Yes, it is long way. We have a lot of discussions aliases. As we have saw, any partial solution raises new issues, problems and discussions. We need to generalize all these discussions and create a common roadmap. I suggest such roadmap. The first step closes this Issue. The next steps close other problems - we should implement all operations - add, delete, modify, update, allow, disallow - in interactive session, in scripts, in remote access.
Reacted by Flavien MICHALECZEK and Jonas B. Andersen
Windows Command line Toolchain includes bsdtar (tar) and curl. These two popular command line tools from the Unix shell are now available in Windows and Windows Server. bsdtar provides handy extraction/creation of compressed files and curl offers data transfer capabilities so you can download files from a remote location. (Build 17063)
We removed curl alias in a timely manner! :-)
Steve Lee (@SteveL-MSFT) I think it's one more argument that it's time to cut this Gordian knot.
I think it might be good to have a symbol to put in front of an alias to invoke using it. That adds one character for typing an alias and allows for keeping some sane defaults. Since we are going for breaking, might as well make it a useful breaking change.
To be honest, the only aliases I care about are the *-Object aliases. I wonder if they are the most commonly used since I tend to see Select -Property rather than Select-Object -Property.
Well, removing curl in PowerShell 5.1 would have been a lot more timely, considering 😉
I definitely agree that Select, Where, and ForEach are the most common aliases that get left in scripts -- because they're basically more readable than the full commands 😕
But I have to repeat, again, I don't want to break anything. I'm trying to stop breaking things, by moving the aliases into modules where nobody will have any excuse to change them anymore.
@PowerShell/powershell-committee reviewed this. We agree that users should easily customize their environment in regards to aliases. We ask that an RFC be authored capturing all the details of the proposed modules to understand the trade-offs and implications. RFC should include alternate considerations instead of a module: script, part of powershell.config.json, etc... Note that if the aliases are exported as part of a module, then auto-module loading will automatically find them so not clear if that is the desired behavior.
Reacted by Joel Bennett, Michael Klement, Ilya, Paul Broadwith, Rain Sallow (/u/ta11ow) and Mr Beedell, Roke Julian Lockhart
The plan is to create tools for flexible aliases management without changing the current behavior. This will allow users to choose a convenient way to work. A separate question is about the default settings - that would be PowerShell Committee's decision.
Kieran Jacobsen (@kjacobsen) - technically Joel Bennett (@Jaykul) is asking for a built in way of managing alias versioning and allowing you the user to maintain which aliases you want by giving you the ability to control this in your own scripts/modules/profiles
Ilya (@iSazonov) - by moving them to modules the "Default" becomes less and less relevant in my view, at least to the power users, however getting it right for the general user is something that I do agree needs to be thought of properly.
Joel Bennett (@Jaykul) further discussion should be in a RFC, since there have been no additional comments here it doesn't seem necessary to keep this issue open. We've been trying to be more digilent on closing issues so we know which ones are actually still active.
It's been very frustrating each time I type ls or cd in a console and the wrong thing happens. I am trying VibeCoding with Ai, and ai Sometimes will use ls , mkdir move ...... in Powershell , but the output message is different with linux,
So I try Busybox , but when ai use ls , it is powershell alias . The Ai doesn't know it should use ls.exe
I wish PowerShell can delete the bultin alias like ls mkdir ... and I can use my own version ls mkdir
Committee-ReviewedPS-Committee has reviewed this and made a decisionIssue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-ExternalThe issue is caused by external component(s).
Activity
Jaykul commentedon Jan 11, 2018
It's been very frustrating each time I type
lsorcdin a console and the wrong thing happens.Now at the eve of GA, yet another alias has been removed:
scIt's time to put an end to the madness, and just clean the slate so this can't ever happen again.
iSazonov commentedon Jan 12, 2018
Joel Bennett (@Jaykul) Thanks for the short and clear thought. I totally agree that the time has come and we have to complete this story that lasts two years.
Related #214 #3610
Based on previous discussions we know that some users want all the Windows aliases, some ones only part, some ones do not want them at all. We have also come to the conclusion that aliases only make sense in an interactive session and should (must) be excluded from scripts.
So I see a simple solution that we can implement in steps:
Step 1. Create compatibility modules (I suggest use
Compatibility-name prefix for them):Compatibility-Aliases-DefaultSet)Compatibility-Aliases-ShortWindowsSet).Compatibility-Aliases-FullWindowsSet).Step 2. Import these modules only in the interactive session. We could add a new setting
InteractiveOnly = $trueto a module manifest. This feature will be useful for all compatibility modules and PSReadline. (Related #3956)Step 3. Enable an user to choose which compatibility module to download or not to download at all using a configuration file (we already have
powershell.config.json) and GPO. Until we implement the option users can load selected compatibility module using their profile file.Step 4. Add an option to disable/enable aliases in scripts - enhance strict mode (run time) or/and
using language aliases allow=$falsestatement (parse time). Add global option (to a configuration filepowershell.config.jsonand GPO) to enable/disable aliases in scripts.Jaykul commentedon Jan 14, 2018
You're making this way too complicated.
There's no need for any functionality to be added in order to remove the default aliases -- even a setting to say which module to import would be overkill when we have profile scripts.
I'm not trying to get the alias feature removed. I use aliases, and I want to keep using them. I don't want to loose the ability to change the name of commands.
I just want to clean out the defaults and give existing users an easy way to load the aliases they're used to. In an ideal world, I want to do all of that without breaking anything more, although obviously we'll need users to add the
Import-Moduleline to their profile.The main point is to ensure we never again break people's experience by such a silly trivial change as removing a built-in alias.
P.S. I honestly don't think you can get a new setting added to module manifests. We still don't have a setting to indicate the supported Edition or Operating System, nevermind something as meta as whether the author thinks the module should be used interactively.
iSazonov commentedon Jan 14, 2018
Yes, it is long way. We have a lot of discussions aliases. As we have saw, any partial solution raises new issues, problems and discussions. We need to generalize all these discussions and create a common roadmap. I suggest such roadmap. The first step closes this Issue. The next steps close other problems - we should implement all operations - add, delete, modify, update, allow, disallow - in interactive session, in scripts, in remote access.
iSazonov commentedon Jan 19, 2018
I get this from Windows Insider mail:
We removed
curlalias in a timely manner! :-)Steve Lee (@SteveL-MSFT) I think it's one more argument that it's time to cut this Gordian knot.
dragonwolf83 commentedon Jan 20, 2018
I think it might be good to have a symbol to put in front of an alias to invoke using it. That adds one character for typing an alias and allows for keeping some sane defaults. Since we are going for breaking, might as well make it a useful breaking change.
To be honest, the only aliases I care about are the
*-Objectaliases. I wonder if they are the most commonly used since I tend to seeSelect -Propertyrather thanSelect-Object -Property.Jaykul commentedon Jan 20, 2018
Well, removing
curlin PowerShell 5.1 would have been a lot more timely, considering 😉I definitely agree that Select, Where, and ForEach are the most common aliases that get left in scripts -- because they're basically more readable than the full commands 😕
But I have to repeat, again, I don't want to break anything. I'm trying to stop breaking things, by moving the aliases into modules where nobody will have any excuse to change them anymore.
SteveL-MSFT commentedon Apr 25, 2018
@PowerShell/powershell-committee reviewed this. We agree that users should easily customize their environment in regards to aliases. We ask that an RFC be authored capturing all the details of the proposed modules to understand the trade-offs and implications. RFC should include alternate considerations instead of a module: script, part of powershell.config.json, etc... Note that if the aliases are exported as part of a module, then auto-module loading will automatically find them so not clear if that is the desired behavior.
DanielSSilva commentedon May 21, 2018
My two cents - While doing some research about alias, I've found some more commands that are native on Unix and are being "mapped" as alias, such as
pauby commentedon May 22, 2018
Has this been picked up as yet?
iSazonov commentedon May 22, 2018
I hope to do it in the coming days.
4 remaining items
iSazonov commentedon Jun 9, 2018
Kieran Jacobsen (@kjacobsen)
helpis a function not alias.The plan is to create tools for flexible aliases management without changing the current behavior. This will allow users to choose a convenient way to work. A separate question is about the default settings - that would be PowerShell Committee's decision.
kilasuit commentedon Jun 9, 2018
Kieran Jacobsen (@kjacobsen) - technically Joel Bennett (@Jaykul) is asking for a built in way of managing alias versioning and allowing you the user to maintain which aliases you want by giving you the ability to control this in your own scripts/modules/profiles
Ilya (@iSazonov) - by moving them to modules the "Default" becomes less and less relevant in my view, at least to the power users, however getting it right for the general user is something that I do agree needs to be thought of properly.
iSazonov commentedon Jun 10, 2018
Some default values will always be present. :-)
ExE-Boss commentedon Aug 24, 2018
Well, the
curlandwgetaliases have been permanently removed in PR #5268 and Windows 10 now ships withcurl.exe. ✌️🏻😄✌️🏻Jaykul commentedon Dec 6, 2018
Steve Lee (@SteveL-MSFT) I assume this is being closed for inaction / failure to create a follow-up RFC?
iSazonov commentedon Dec 6, 2018
I wonder too.
SteveL-MSFT commentedon Dec 6, 2018
Joel Bennett (@Jaykul) further discussion should be in a RFC, since there have been no additional comments here it doesn't seem necessary to keep this issue open. We've been trying to be more digilent on closing issues so we know which ones are actually still active.
iSazonov commentedon Dec 7, 2018
I set
Resolution-Externalimplying that the discussion should be in the RFC.Small Fixes to Get-FileEncoding
Small Fixes to Get-FileEncoding
Small Fixes to Get-FileEncoding
Squashed commit of the following:
sunflower-knight commentedon Dec 12, 2025
It's been very frustrating each time I type ls or cd in a console and the wrong thing happens. I am trying VibeCoding with Ai, and ai Sometimes will use ls , mkdir move ...... in Powershell , but the output message is different with linux,
So I try Busybox , but when ai use
ls, it is powershell alias . The Ai doesn't know it should use ls.exeI wish PowerShell can delete the bultin alias like
ls mkdir ...and I can use my own versionls mkdir