4 Replies Latest reply on Apr 3, 2013 1:28 PM by Jason Lee

    Powershell script local execution error

      Share This:

      Hi Experts,


      I am getting below error when i am executing some powershell script locally on CDP machine using powershell adapter



        <line index="1">Ampersand not allowed. The & operator is reserved for future use; use "&" to pa</line>

        <line index="2">ss ampersand as a string.</line>

        <line index="3">At line:1 char:37</line>

        <line index="4">+ Set-ExecutionPolicy unrestricted; ^& <<<< </line>

        <line index="5"> + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordEx </line>

        <line index="6"> ception</line>

        <line index="7"> + FullyQualifiedErrorId : AmpersandNotAllowed</line>

        <line index="8"> </line>



      my adapter configuration is :




        <password encryption-type="Plain">password</password>








      and my adapter request is :













      <command working-dir="D:\Folder" timeout-secs="3600">./XYZ.ps1</command>




      But other powershell command execution is successful and i dont want to use Xcmd feature of powershell that's why i configured adapter to execute locally. And i am using a service account with administrative privilege.



      Powershell Adapter version:

      AO Server : 7.6.04



      Let me know if i missing something somewhere.


      Thanks in advance.