I tried the following with no luck
[MSH] C:\Documents and Settings\admin>& "$pwd\test.ps1"
Program 'test.ps1' failed to execute: No application is associated with the
spe
cified file for this operation
At line:1 char:2
+ & <<<< "$pwd\test.ps1".
At line:1 char:1
+ & <<<< "$pwd\test.ps1"
[MSH] C:\Documents and Settings\admin>& $pwd\test.ps1
Program 'test.ps1' failed to execute: No application is associated with the
spe
cified file for this operation
At line:1 char:2
+ & <<<< $pwd\test.ps1.
At line:1 char:1
+ & <<<< $pwd\test.ps1
[MSH] C:\Documents and Settings\admin>.\test.ps1
Program 'test.ps1' failed to execute: No application is associated with the
spe
cified file for this operation
At line:1 char:10
+ .\test.ps1 <<<< .
At line:1 char:1
+ . <<<< \test.ps1
"Marco Shaw [MVP]" wrote:
Quote:
> Quote:
> > [MSH] C:\Documents and Settings\admin>$pwd\test.ps1
> > Unexpected token '\test.ps1' in expression or statement.
> > At line:1 char:13
> > + $pwd\test.ps1 <<<<
> >
> >
> > Can anyone tell me why this is not working.
>
> PowerShell is not dealing with the backslash properly. Run it like this:
>
> PSH> & "$pwd\test.ps1"
>
> Marco
>
> --
> Microsoft MVP - Windows PowerShell
> http://www.microsoft.com/mvp
>
> PowerGadgets MVP
> http://www.powergadgets.com/mvp
>
> Blog:
> http://marcoshaw.blogspot.com
>