Setting alias in Windows PowerShell
Posted
by
westsider
on Super User
See other posts from Super User
or by westsider
Published on 2011-06-28T22:40:02Z
Indexed on
2011/06/29
0:24 UTC
Read the original article
Hit count: 645
In PowerShell, I type:
PS C:> sal cdp "cd 'C:\Users\ec\Documents\Visual Studio 2010\Projects'"
I get no error from this, and
PS C:> gal cdp
shows definition as: cd 'C:\Users\ec\Documents\Visual Studio 2010\Projects'
But, when I try to use cdp, I get this:
Cannot resolve alias 'cdp' because it refers to term 'cd 'C:\Users\ec\Documents\Visual Studio 2010\Projects'', which is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again. At line:1 char:4
+ cdp <<<<
+ CatergoryInfo : ObjectNotFound (dsp:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : AliasNotResolvedException
I am guessing that this is trivially easy. So I apologize in advance if that is the case. I have googled and googled and have also read through Windows PowerShell Cookbook.
© Super User or respective owner