Execute a powershell script

Forums Desktop Info Execute a powershell script

Tagged: ,

Viewing 2 reply threads
  • Author
    Posts
    • #2177
      mitobaMiguel

        Hi everybody,

        I’m trying execute a powershell script with CMD Command but I’m not be able, it doesn’t work. I’ve a script to check updates pending properly, and manually it works and write the exit in a text file.

        I follow the manual but DTI does’t execute the script .ps1.

        Somebody have an example to execute a powershell script?

        Thanks in advance.

      • #2180
        GlennGlenn
        Keymaster

          I couldn’t get it to execute either. I’ll look into it.

          • #2186
            mitobamitoba

              Hi Glenn,

              I could execute a powershell script but Ho Can I hide the command line in DTI?

              Regards.

              • #2193
                GlennGlenn
                Keymaster

                  what do you mean?

            • #2195
              GlennGlenn
              Keymaster

                The issue is execution policy. To make it work for me I have to type the following in to a Powershell command line window:

                Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

                This allows DTI to run a script. This is the script I tested:

                test.ps1

                The line with “exit 667” puts the 667 exit code on the DTI display to assure me the script actually executed.

                This is the call in desktopinfo.ini:

                • This reply was modified 3 years ago by GlennGlenn.
                • This reply was modified 3 years ago by GlennGlenn.
            Viewing 2 reply threads
            • The topic ‘Execute a powershell script’ is closed to new replies.
            Glenn's Page