From a comment at http://www.davidarno.org/2008/04/08/pash-powershell-for-the-rest-of-us/:

With the ksh, I could type whence -v cd to determine that cd was a tracked alias of say /bin/cd. In PowerShell, cd is an alias of Set-Location, but I only found this out because I typed help cd, and got the Set-Location help page. The whence -v command would report whether the item was a function, alias, tracked alias, or give the file location.

How can we do this in PowerShell?


Use the Get-Command cmdlet, which has a convenient alias gcm:

> Get-Command cd

CommandType     Name                                               ModuleName
-----------     ----                                               ----------
Alias           cd -> Set-Location

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.