powershellalias

How do I remove or replace a built in alias in powershell?


Powershell includes a built-in alias diff for the Compare-Object cmdlet. This is really annoying for me, as I'm used to using the Unix diff command.

Is there a way to remove the built in diff alias, or otherwise override it?

I've tried:

How do I get access to the "real" diff (without having to remember a different name)?

In case it matters, this is Powershell 3. I haven't tried it in version 4 yet, although version 4 also has a wget alias, but unlike diff I could remove that one...


Solution

  • Try removing if forcefully.

    del alias:diff -Force