you are right, I notice afterwards. I change file to .msh and now all is
working.
"Brandon Shell [MVP]" wrote:
Quote:
> Are you using Powershell V1? The [MSH] implies you are using a beta/RC product.
>
> You can use Get-Host to get this.
>
> Brandon Shell
> ---------------
> Blog: http://www.bsonposh.com/
> PSH Scripts Project: www.codeplex.com/psobject
>
> m> I am trying to run a powershell script and I get the following error.
> m>
> m> [MSH] C:\Documents and Settings\admin>ls
> m>
> m> Directory: Microsoft.Msh.Core\FileSystem::C:\Documents and
> m> Settings\admi
> m> n
> m> Mode LastWriteTime Length Name
> m> ---- ------------- ------ ----
> m> -a--- 2/27/2006 10:35 PM 0 Sti_Trace.log
> m> -a--- 11/6/2007 2:10 PM 453 test.ps1
> m> d---- 2/27/2006 10:33 PM Desktop
> m> d-r-- 3/16/2006 2:11 AM Favorites
> m> d-r-- 3/21/2006 2:59 AM My Documents
> m> d-r-- 2/27/2006 10:33 PM Start Menu
> m> [MSH] C:\Documents and Settings\admin>$pwd\test.ps1
> m> Unexpected token '\test.ps1' in expression or statement.
> m> At line:1 char:13
> m> + $pwd\test.ps1 <<<<
> m> Can anyone tell me why this is not working.
> m>
>
>
>