Set-Location : A positional parameter cannot be found that accepts argument 'and'.

07/01/2012 14:34

PS C:\> cd c:\Documents and Settings\Lukas\Desktop\XMLskusky
Set-Location : A positional parameter cannot be found that accepts argument 'and'.
At line:1 char:3
+ cd <<<<  c:\Documents and Settings\Lukas\Desktop\XMLskusky
    + CategoryInfo          : InvalidArgument: (:) [Set-Location], ParameterBi
   ndingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell
   .Commands.SetLocationCommand

 

If path contains spaces, it must be closed in quotation marks

PS C:\> cd "c:\Documents and Settings\Lukas\Desktop\XMLskusky"