Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some aliases that are defined in MS Dos style, how can I invoke those from Powershell? When I type "alias" from Powershell prompt, I can see my aliases defined there but when I try to call them by just typing their names, Powershell complains with a message like "The term 'whatever' is not recognized as the name of a cmdlet...".

share|improve this question
Please add an example. – pk. Jun 5 '12 at 20:40
@pk I believe these are aliases set up via doskey. Example: – sysadmin1138 Jun 5 '12 at 20:46
up vote 1 down vote accepted

From Getting doskey macros to work in PowerShell:

PS> doskey /exename=powershell.exe cd\home=pushd $env:USERPROFILE\$*


PS> doskey /exename=powershell.exe /MACROFILE=mymacros.txt

See that page for more information.

share|improve this answer
I've read that article. This one doesn't seem to work for me. I.e., after running doskey /exename=powershell.exe cd\home=pushd $env:USERPROFILE\$* in PowerShell, if I type cd\home I get an error cd\home : The module 'cd' could not be loaded. – KFL Sep 4 '15 at 23:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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