Windows Vista Forums

The term '>' is not recognized as a cmdlet

  1. #1


    vinod Guest

    The term '>' is not recognized as a cmdlet

    Hi,
    I am trying samples from Bruce Payette's Book. Why I am not able to
    type the sample and run? Below sample is an attempt to create script
    file on Powershell prompt.


    PS D:\Documents\PSH_Scripts> $x=1
    PS D:\Documents\PSH_Scripts> > @'
    >> function 1func { $x = 100; $script:x=10 ; "1func: x = $x"}
    >> 1func
    >> "my-script:x = $x"
    >> '@ > my-script.ps1
    >>

    The term '>' is not recognized as a cmdlet, function, operable
    program, or script file. Verify the term and try again.
    At line:1 char:2
    + > <<<< @'

    Thanks,
    Vinod


      My System SpecsSystem Spec

  2.   


  3. #2


    Doug Guest

    Re: The term '>' is not recognized as a cmdlet

    Try it without typing in ">" before @'
    PS D:\Documents\PSH_Scripts> @'


    "vinod" <vkushwaha@gmail.com> wrote in message
    news:1173968333.008065.130340@p15g2000hsd.googlegroups.com...
    > Hi,
    > I am trying samples from Bruce Payette's Book. Why I am not able to
    > type the sample and run? Below sample is an attempt to create script
    > file on Powershell prompt.
    >
    >
    > PS D:\Documents\PSH_Scripts> $x=1
    > PS D:\Documents\PSH_Scripts> > @'
    >>> function 1func { $x = 100; $script:x=10 ; "1func: x = $x"}
    >>> 1func
    >>> "my-script:x = $x"
    >>> '@ > my-script.ps1
    >>>

    > The term '>' is not recognized as a cmdlet, function, operable
    > program, or script file. Verify the term and try again.
    > At line:1 char:2
    > + > <<<< @'
    >
    > Thanks,
    > Vinod
    >




      My System SpecsSystem Spec

  4. #3


    vinod Guest

    Re: The term '>' is not recognized as a cmdlet

    On Mar 15, 12:24 pm, "Doug" <doug.sl...@gmail.com> wrote:
    > Try it without typing in ">" before @'
    > PS D:\Documents\PSH_Scripts> @'
    >
    > "vinod" <vkushw...@gmail.com> wrote in message
    >
    > news:1173968333.008065.130340@p15g2000hsd.googlegroups.com...
    >
    >
    >
    > > Hi,
    > > I am trying samples from Bruce Payette's Book. Why I am not able to
    > > type the sample and run? Below sample is an attempt to create script
    > > file on Powershell prompt.

    >
    > > PS D:\Documents\PSH_Scripts> $x=1
    > > PS D:\Documents\PSH_Scripts> > @'
    > >>> function 1func { $x = 100; $script:x=10 ; "1func: x = $x"}
    > >>> 1func
    > >>> "my-script:x = $x"
    > >>> '@ > my-script.ps1

    >
    > > The term '>' is not recognized as a cmdlet, function, operable
    > > program, or script file. Verify the term and try again.
    > > At line:1 char:2
    > > + > <<<< @'

    >
    > > Thanks,
    > > Vinod- Hide quoted text -

    >
    > - Show quoted text -


    Today, Same script sample from Bruce's book is not giving any errors.
    I don't know why.

    Thanks,
    Vinod


      My System SpecsSystem Spec


The term '>' is not recognized as a cmdlet
Similar Threads
Thread Forum
get-hotfix return 'The term 'get-hotfix' is not recognized' PowerShell
Quest AD cmdlet -what is the cmdlet to remove computer object PowerShell
Invoking Cmdlet Get-Location from cmdlet,cant get Currnt Directory PowerShell
Command doesn't work in PowerShell term but works in DOS term PowerShell
'Write-object' is not recognized as a cmdlet, function, operable program, or script file PowerShell