Setting alias in Windows PowerShell
- by westsider
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.