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

    Install Chocolatey on all Domains Computers PS

    IT Discussion
    powershell powershell remoting chocolatey
    7
    12
    1.1k
    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.
    • dbeatoD
      dbeato
      last edited by dbeato

      I just worked on this small but useful script if you have a domain and need to install chocolatey remotely. Make sure that WinRM is enabled on all the computers prior to running it and that your computer has RSAT installed. If you have more efficient ways, please let me know.

      Import-Module ActiveDirectory 
      $Computers = Get-ADComputer -Filter * | Select-Object -ExpandProperty Name
      
      ForEach ($computer in $Computers) {
      Invoke-Command -ComputerName $Computer -ScriptBlock {
      
      Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
      
      }
      }
      
      M 1 Reply Last reply Reply Quote 5
      • F
        flaxking
        last edited by

        It'll be a year since I've done it, but at that time I just made sure the files copied on to every computer. Not sure what else the powershell script does except for set an environment variable

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

          @flaxking said in Install Chocolatey on all Domains Computers PS:

          It'll be a year since I've done it, but at that time I just made sure the files copied on to every computer. Not sure what else the powershell script does except for set an environment variable

          It does the install. No need to download Chocolatey, this runs the installer from the web.

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

            @dbeato said in Install Chocolatey on all Domains Computers PS:

            If you have more efficient ways, please let me know.

            I use Ansible to install Chocolatey on windows machines. You need to set them up so Ansible can manage them, it's a well documented process though. Ansible docs have all the info for that. Now any playbook or role that invokes win_chocolatey module will install Chocolatey if missing. Here's a sample:

            ---
            - hosts: all
              tasks:
              - name: Upgrade all software
                win_chocolatey:
                  name: all
                  state: latest
            1 Reply Last reply Reply Quote 3
            • A
              Alex Sage
              last edited by

              How fast does chocolatey get update for things like Adobe Flash?

              scottalanmillerS M 2 Replies Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller @Alex Sage
                last edited by

                @aaronstuder said in Install Chocolatey on all Domains Computers PS:

                How fast does chocolatey get update for things like Adobe Flash?

                Depends on how quickly Adobe rolls them out. It's Adobe in that case, not Chocolatey, that is the deciding factor.

                DustinB3403D 1 Reply Last reply Reply Quote 0
                • DustinB3403D
                  DustinB3403 @scottalanmiller
                  last edited by

                  @scottalanmiller said in Install Chocolatey on all Domains Computers PS:

                  @aaronstuder said in Install Chocolatey on all Domains Computers PS:

                  How fast does chocolatey get update for things like Adobe Flash?

                  Depends on how quickly Adobe rolls them out. It's Adobe in that case, not Chocolatey, that is the deciding factor.

                  Not quite true, the chocolatey maintainer needs to update the chocolatey repo as well.

                  A 1 Reply Last reply Reply Quote 2
                  • A
                    Alex Sage @DustinB3403
                    last edited by

                    @dustinb3403 said in Install Chocolatey on all Domains Computers PS:

                    Not quite true, the chocolatey maintainer needs to update the chocolatey repo as well.

                    Exactly. How long does that take?

                    DustinB3403D scottalanmillerS 2 Replies Last reply Reply Quote 0
                    • DustinB3403D
                      DustinB3403 @Alex Sage
                      last edited by

                      @aaronstuder said in Install Chocolatey on all Domains Computers PS:

                      @dustinb3403 said in Install Chocolatey on all Domains Computers PS:

                      Not quite true, the chocolatey maintainer needs to update the chocolatey repo as well.

                      Exactly. How long does that take?

                      This depends, on if the maintainer is actually looking g out for updates and pushing them through.

                      With ShareX the original maintainer disappeared, so the chocolatey team took over it. It took about a month for that transition. Because they were attempting to get the software developer to maintain the chocolatey repo.

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

                        @aaronstuder said in Install Chocolatey on all Domains Computers PS:

                        @dustinb3403 said in Install Chocolatey on all Domains Computers PS:

                        Not quite true, the chocolatey maintainer needs to update the chocolatey repo as well.

                        Exactly. How long does that take?

                        As long as each vendor decides. You'd have to monitor Adobe Flash releases, monitor their releases on Chocolatey and use that to guess what the future will be like.

                        Flash is dead, so I doubt any one is paying attention to it. Those that need it get a secure version built into Chrome. I can't remember the last time I installed (or used) Flash.

                        But it 100% comes down to "how much faith do you have in Adobe's release procedures."

                        1 Reply Last reply Reply Quote 0
                        • M
                          marcinozga @Alex Sage
                          last edited by

                          @aaronstuder said in Install Chocolatey on all Domains Computers PS:

                          How fast does chocolatey get update for things like Adobe Flash?

                          Probably faster that if you did it manually. It depends on maintainer, but most popular packages are updated quickly.

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

                            The specific package adobereader is a horrible example though.

                            Because until this month, you installed adobereader-update which also installed adobereader first as part of the package.

                            But now, suddenly, adobereader is all that is needed.

                            adobereader history.
                            0_1537676808803_b9217e22-5cdd-4aa6-9af9-dc93b4387ffe-image.png

                            adobereader-update history.
                            0_1537676966787_97d7b185-0c2b-4fd0-83b1-1dc12de16985-image.png

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