ML
    • Register
    • Login
    • Search
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups

    Windows Agent acting up.

    SodiumSuite
    6
    9
    1047
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • travisdh1
      travisdh1 last edited by

      Started PowerShell as an administrator and it threw a number of errors at me, so I took a look at the script in PowerShell(ISE) and don't see where the issue is myself. Some parameters are unexpected according to it, but removing the unexpected parameters also doesn't work. Windows, wasn't PowerShell supposed to just work like a terminal emulator sigh.

      PS C:\WINDOWS\system32> @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object 
      System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET 
      "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin\" -y  
      At line:1 char:13
      + @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Ob ...
      +             ~~~~~~~~~~
      Unexpected token '-NoProfile' in expression or statement.
      At line:1 char:24
      + @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Ob ...
      +                        ~~~~~~~~~~~~~~~~
      Unexpected token '-ExecutionPolicy' in expression or statement.
      At line:1 char:152
       + ... nt).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PA ...
      +                                                                ~~
      The token '&&' is not a valid statement separator in this version.
      At line:1 char:1
       + @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Ob ...
       + ~~~~~~~~~~~
       The splatting operator '@' cannot be used to reference variables in an expression. '@powershell' can be used only as an 
      argument to a command. To reference variables in 
      an expression use '$powershell'.
          + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
          + FullyQualifiedErrorId : UnexpectedToken
      
      1 Reply Last reply Reply Quote 0
      • black3dynamite
        black3dynamite last edited by black3dynamite

        You should be using command prompt instead of powershell to run that command.

        travisdh1 dbeato caramel 3 Replies Last reply Reply Quote 4
        • travisdh1
          travisdh1 @black3dynamite last edited by

          @black3dynamite said in Windows Agent acting up.:

          You should be using command prompt instead of powershell to run that command.

          Well, bother, that'd do it!

          1 Reply Last reply Reply Quote 0
          • dbeato
            dbeato @black3dynamite last edited by

            @black3dynamite said in Windows Agent acting up.:

            You should be using command prompt instead of powershell to run that command.

            Whoopsie
            alt text

            travisdh1 1 Reply Last reply Reply Quote 2
            • caramel
              caramel @black3dynamite last edited by

              @black3dynamite said in Windows Agent acting up.:

              You should be using command prompt instead of powershell to run that command.

              It's always the simple things.

              1 Reply Last reply Reply Quote 2
              • travisdh1
                travisdh1 @dbeato last edited by

                @dbeato said in Windows Agent acting up.:

                @black3dynamite said in Windows Agent acting up.:

                You should be using command prompt instead of powershell to run that command.

                Whoopsie
                alt text

                Exactly. I just default to opening PowerShell rather than a command prompt anymore.

                1 Reply Last reply Reply Quote 0
                • JaredBusch
                  JaredBusch last edited by

                  Chocolatey's install page clearly states that is a command prompt command.

                  With the powershell command directly below it.. This is user fail from start to finish.

                  0_1511970206348_9f66245c-7eb6-4af9-95af-3527be0fcb9c-image.png

                  dbeato 1 Reply Last reply Reply Quote 1
                  • Dashrender
                    Dashrender last edited by

                    Aww JB, the little ray of sunshine in everyone's life.

                    1 Reply Last reply Reply Quote 6
                    • dbeato
                      dbeato @JaredBusch last edited by

                      @jaredbusch said in Windows Agent acting up.:

                      Chocolatey's install page clearly states that is a command prompt command.

                      With the powershell command directly below it.. This is user fail from start to finish.

                      0_1511970206348_9f66245c-7eb6-4af9-95af-3527be0fcb9c-image.png

                      That was like
                      alt text

                      1 Reply Last reply Reply Quote 1
                      • First post
                        Last post