title: How do I remove or replace a built in alias in powershell?
body: <p>Powershell includes a built-in alias <code>diff</code> for the <code>Compare-Object</code> cmdlet. This is really annoying for me, as I'm used to using the Unix <code>diff</code> command.</p>
  
  <p>Is there a way to remove the built in <code>diff</code> alias, or otherwise override it?</p>
  
  <p>I've tried:</p>
  
  <ul>
  <li><code>del alias:diff</code> - gives an error "Alias was not removed because alias diff is constant or read-only"</li>
  <li><code>set-alias diff diff.exe</code> - gives an error similar to the above</li>
  <li><code>function diff { diff.exe $args }</code> - the alias takes precedence</li>
  </ul>
  
  <p>How do I get access to the "real" diff (without having to remember a different name)?</p>
  
  <p>In case it matters, this is Powershell 3. I haven't tried it in version 4 yet, although version 4 also has a <code>wget</code> alias, but unlike diff I could remove that one...</p>