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

    Group Policy Deployed software vs Chocolatey in a Domain

    Scheduled Pinned Locked Moved IT Discussion
    group policywindowschocolateypackage management
    21 Posts 5 Posters 14.6k Views
    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.
    • coliverC
      coliver
      last edited by coliver

      https://chocolatey.org/packages?sortOrder=package-download-count&page=2&prerelease=True&moderatorQueue=False

      Looks like it can do 2013 Home Premium and ProPlus. In addition to Flash, Chrome, Reader, Java, and FileZilla.

      1 Reply Last reply Reply Quote 0
      • ?
        A Former User
        last edited by

        I tried deploying Chocolatey to a test machine via GP start up script it doesn't seem to work..

        What did I do wrong?

        @echo off
        
        
        
        SET FLAG=%HOMEDRIVE%\choco.txt
        
        
        
        IF EXIST %FLAG% GOTO END
        
        
        
        @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object       net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET    PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
        
        :END
        
        1 Reply Last reply Reply Quote 0
        • DashrenderD
          Dashrender
          last edited by

          Powerscript exploded when I tried to run that.

          PS U:\> @echo off
          At line:1 char:7
          + @echo off
          +       ~~~
          Unexpected token 'off' in expression or statement.
          At line:1 char:1
          + @echo off
          + ~~~~~
          The splatting operator '@' cannot be used to reference variables in an expression. '@echo'     can be used only as an
          argument to a command. To reference variables in an expression use '$echo'.
              + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
              + FullyQualifiedErrorId : UnexpectedToken
          
          PS U:\>
          PS U:\>
          PS U:\>
          PS U:\> SET FLAG=%HOMEDRIVE%\choco.txt
          PS U:\>
          PS U:\>
          PS U:\>
          PS U:\> IF EXIST %FLAG% GOTO END
          At line:1 char:3
          + IF EXIST %FLAG% GOTO END
          +   ~
          Missing '(' after 'IF' in if statement.
          + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
          + FullyQualifiedErrorId : MissingOpenParenthesisInIfStatement
          
          PS U:\>
          PS U:\>
          PS U:\>
          PS U:\> @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-    object       net.webclient).DownloadSt
          ring('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET          PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
          At line:1 char:13
          + @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object ...
          +             ~~~~~~~~~~
          Unexpected token '-NoProfile' in expression or statement.
          At line:1 char:24
          + @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object ...
          +                        ~~~~~~~~~~~~~~~~
          Unexpected token '-ExecutionPolicy' in expression or statement.
          At line:1 char:171
          + ... ) >$null 2>&1" && SET    PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
          +                    ~~
          The token '&&' is not a valid statement separator in this version.
          At line:1 char:1
          + @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object ...
          + ~~~~~~~~~~~
          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
          
          PS U:\>
          PS U:\> :END
          
          ? 1 Reply Last reply Reply Quote 0
          • ?
            A Former User @Dashrender
            last edited by A Former User

            @Dashrender said:

            Powerscript exploded when I tried to run that.

            PS U:\> @echo off
            At line:1 char:7
            + @echo off
            +       ~~~
            Unexpected token 'off' in expression or statement.
            At line:1 char:1
            + @echo off
            + ~~~~~
            The splatting operator '@' cannot be used to reference variables in an expression. '@echo'     can be used only as an
            argument to a command. To reference variables in an expression use '$echo'.
                + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
                + FullyQualifiedErrorId : UnexpectedToken
            
            PS U:\>
            PS U:\>
            PS U:\>
            PS U:\> SET FLAG=%HOMEDRIVE%\choco.txt
            PS U:\>
            PS U:\>
            PS U:\>
            PS U:\> IF EXIST %FLAG% GOTO END
            At line:1 char:3
            + IF EXIST %FLAG% GOTO END
            +   ~
            Missing '(' after 'IF' in if statement.
            + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
            + FullyQualifiedErrorId : MissingOpenParenthesisInIfStatement
            
            PS U:\>
            PS U:\>
            PS U:\>
            PS U:\> @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-    object       net.webclient).DownloadSt
            ring('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET          PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
            At line:1 char:13
            + @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object ...
            +             ~~~~~~~~~~
            Unexpected token '-NoProfile' in expression or statement.
            At line:1 char:24
            + @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object ...
            +                        ~~~~~~~~~~~~~~~~
            Unexpected token '-ExecutionPolicy' in expression or statement.
            At line:1 char:171
            + ... ) >$null 2>&1" && SET    PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
            +                    ~~
            The token '&&' is not a valid statement separator in this version.
            At line:1 char:1
            + @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object ...
            + ~~~~~~~~~~~
            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
            
            PS U:\>
            PS U:\> :END
            

            Did you save it as a batch file first? It's working for me now. It calls PS from the batch file. It's not a powershell script itself.

            DashrenderD 1 Reply Last reply Reply Quote 0
            • coliverC
              coliver
              last edited by

              Are you able to make custom packages with this without uploaded them to the Chocolaty repos?

              ? 1 Reply Last reply Reply Quote 0
              • DashrenderD
                Dashrender @A Former User
                last edited by

                @thecreativeone91 said:

                @Dashrender said:

                Powerscript exploded when I tried to run that.

                PS U:\> @echo off
                At line:1 char:7
                + @echo off
                +       ~~~
                Unexpected token 'off' in expression or statement.
                At line:1 char:1
                + @echo off
                + ~~~~~
                The splatting operator '@' cannot be used to reference variables in an expression. '@echo'     can be used only as an
                argument to a command. To reference variables in an expression use '$echo'.
                    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
                    + FullyQualifiedErrorId : UnexpectedToken
                
                PS U:\>
                PS U:\>
                PS U:\>
                PS U:\> SET FLAG=%HOMEDRIVE%\choco.txt
                PS U:\>
                PS U:\>
                PS U:\>
                PS U:\> IF EXIST %FLAG% GOTO END
                At line:1 char:3
                + IF EXIST %FLAG% GOTO END
                +   ~
                Missing '(' after 'IF' in if statement.
                + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
                + FullyQualifiedErrorId : MissingOpenParenthesisInIfStatement
                
                PS U:\>
                PS U:\>
                PS U:\>
                PS U:\> @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-    object       net.webclient).DownloadSt
                ring('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET          PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
                At line:1 char:13
                + @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object ...
                +             ~~~~~~~~~~
                Unexpected token '-NoProfile' in expression or statement.
                At line:1 char:24
                + @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object ...
                +                        ~~~~~~~~~~~~~~~~
                Unexpected token '-ExecutionPolicy' in expression or statement.
                At line:1 char:171
                + ... ) >$null 2>&1" && SET    PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
                +                    ~~
                The token '&&' is not a valid statement separator in this version.
                At line:1 char:1
                + @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object ...
                + ~~~~~~~~~~~
                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
                
                PS U:\>
                PS U:\> :END
                

                Did you save it as a batch file first? It's working for me now. It calls PS from the batch file. It's not a powershell script itself.

                Nope - suppose I should do that - lol.

                I just pasted the whole thing in Powershell. That explains most of the puke.

                1 Reply Last reply Reply Quote 0
                • ?
                  A Former User @coliver
                  last edited by

                  @coliver said:

                  Are you able to make custom packages with this without uploaded them to the Chocolaty repos?

                  You just make your own repo. https://mbrownnyc.wordpress.com/2013/09/06/create-your-own-nuget-server-to-serve-packages/

                  coliverC 1 Reply Last reply Reply Quote 1
                  • coliverC
                    coliver @A Former User
                    last edited by

                    @thecreativeone91 said:

                    @coliver said:

                    Are you able to make custom packages with this without uploaded them to the Chocolaty repos?

                    You just make your own repo. https://mbrownnyc.wordpress.com/2013/09/06/create-your-own-nuget-server-to-serve-packages/

                    Thanks.

                    1 Reply Last reply Reply Quote 0
                    • scottalanmillerS
                      scottalanmiller
                      last edited by

                      Chocolatey is nice because it mimics how Linux and Mac handle updates. It is a "pull" from the client which is ideal if you have non-domain machines, home machines or machines that are in the field. It's perfect when you don't want to be using AD or don't want to be pushing updates or whatever. For everyone? Heck no. But a very useful tool and the perfect one in a lot of cases. Especially when you start making your own repos to control every aspect of what is being deployed.

                      Chocolatey is especially good if you want to democratize software deployments and push that duty out to end users.

                      GP is really good when you have users on the LAN and want to be a bit more in control.

                      ? 1 Reply Last reply Reply Quote 0
                      • DashrenderD
                        Dashrender
                        last edited by Dashrender

                        Do the end users have to have local admin rights to use Chocolatey?

                        If so, that would kill it for me in a business where I manage the machines.

                        In a BOYD that could be awesome.

                        scottalanmillerS 2 Replies Last reply Reply Quote 0
                        • scottalanmillerS
                          scottalanmiller @Dashrender
                          last edited by

                          @Dashrender said:

                          Do the end users have to have local admin rights to use Chocolatey?

                          Depends what you are deploying and how you want to deploy it. You can script Chocolatey and automate it so that you could do a lot of fancy things with it if you wanted.

                          1 Reply Last reply Reply Quote 0
                          • scottalanmillerS
                            scottalanmiller @Dashrender
                            last edited by

                            @Dashrender said:

                            If so, that would kill it for me in a business where I manage the machines.

                            You can give them access to single install commands rather than to just anything. Or give them access only to your repo so that you don't care if they are installing willy nilly (e.g. anyone can install Notepad++ as the administrator, but nothing else.)

                            Giving users access to Chocolatey would mean that they could run updates anytime that they wanted.

                            1 Reply Last reply Reply Quote 0
                            • DashrenderD
                              Dashrender
                              last edited by

                              So you script Chocolately itself to somehow have local admin rights, while the user doesn't?

                              scottalanmillerS 1 Reply Last reply Reply Quote 0
                              • scottalanmillerS
                                scottalanmiller @Dashrender
                                last edited by

                                @Dashrender said:

                                So you script Chocolately itself to somehow have local admin rights, while the user doesn't?

                                Yup, this is a pretty common way of handling tasks of this nature.

                                1 Reply Last reply Reply Quote 0
                                • ?
                                  A Former User @scottalanmiller
                                  last edited by

                                  @scottalanmiller said:

                                  GP is really good when you have users on the LAN and want to be a bit more in control.

                                  We could do it all with GP the major issues is handling updates and sometimes the break and slow down logins. I might not use chocolatey but it is very interesting.

                                  I ran the script via task scheduler (push from GP) and run it in the System account.

                                  1 Reply Last reply Reply Quote 0
                                  • DashrenderD
                                    Dashrender
                                    last edited by

                                    There have been other tools talked about here and SW, and of course I can't think of their names - for the more normal things that people deploy to end users.

                                    scottalanmillerS 1 Reply Last reply Reply Quote 0
                                    • scottalanmillerS
                                      scottalanmiller @Dashrender
                                      last edited by

                                      @Dashrender said:

                                      There have been other tools talked about here and SW, and of course I can't think of their names - for the more normal things that people deploy to end users.

                                      Yes, there are several. Ninite is popular.

                                      Chocolatey's big benefits are open source, free and that you can run your own repo. That it is easy to automate does not make it unique, but is a big deal.

                                      1 Reply Last reply Reply Quote 0
                                      • scottalanmillerS
                                        scottalanmiller
                                        last edited by

                                        With Chocolatey a nice thing to do is make a scheduled task that does a full package update at some specific time (middle of the night, lunch time, whatever.) This works even when the machines are off network (but online.)

                                        1 Reply Last reply Reply Quote 0
                                        • ?
                                          A Former User
                                          last edited by

                                          Ninite costs and is even more limiting than GP assigned software. I'd love SCCM seems to be the best but we aren't looking at SCCM right now. Chocolatey is more powerful than GP. Problem is I still haven't found the best way to script the initial install of programs and chocolatety.

                                          1 Reply Last reply Reply Quote 1
                                          • MattSpellerM
                                            MattSpeller
                                            last edited by

                                            I love ninite for personal use. Nuke/pave times drop dramatically.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post