Calling All Chocolatiers! Whipping Up Windows Automation with Chocolatey Central Management

We are delighted to announce the release of Chocolatey Central Management v0.12.0, featuring seamless Deployment Plan creation, time-saving duplications, insightful Group Details, an upgraded Dashboard, bug fixes, user interface polishing, and refined documentation. As an added bonus we'll have members of our Solutions Engineering team on-hand to dive into some interesting ways you can leverage the new features available!

Learn More Register Now

Chocolatey Community Coffee Break

Join the Chocolatey Team on our regular monthly stream where we discuss all things Community, what we do, how you can get involved and answer your Chocolatey questions.

Learn More

Chocolatey Product Spotlight

Join the Chocolatey Team on our regular monthly stream where we put a spotlight on the most recent Chocolatey product releases. You'll have a chance to have your questions answered in a live Ask Me Anything format.

Learn More

Announcing Chocolatey Central Management 0.10.0

Livestream from
Thursday, 06 October 2022

We recently released our largest update to Chocolatey Central Management so far. Join Gary and Steph to find out more about Chocolatey Central Management and the new features and fixes we've added to this release.

Watch On-Demand
Chocolatey and Intune Overview

Webinar Replay from
Wednesday, 30 March 2022

At Chocolatey Software we strive for simple, and teaching others. Let us teach you just how simple it could be to keep your 3rd party applications updated across your devices, all with Intune!

Watch On-Demand
Chocolatey For Business. In Azure. In One Click.

Livestream from
Thursday, 9 June 2022

Join James and Josh to show you how you can get the Chocolatey For Business recommended infrastructure and workflow, created, in Azure, in around 20 minutes.

Watch On-Demand
The Future of Chocolatey CLI

Livestream from
Thursday, 04 August 2022

Join Paul and Gary to hear more about the plans for the Chocolatey CLI in the not so distant future. We'll talk about some cool new features, long term asks from Customers and Community and how you can get involved!

Watch On-Demand
Hacktoberfest Tuesdays 2022

Livestreams from
October 2022

For Hacktoberfest, Chocolatey ran a livestream every Tuesday! Re-watch Cory, James, Gary, and Rain as they share knowledge on how to contribute to open-source projects such as Chocolatey CLI.

Watch On-Demand
Chocolatey Product Spotlight: Chocolatey 1.2.0 and Chocolatey Licensed Extension 5.0.0

Livestream from
Thursday, 03 November 2022

Join Paul and Gary for this months Chocolatey product livestream where we look at the latest release of Chocolatey 1.2.0, Chocolatey Licensed Extension 5.0.0 and shine a spotlight on the new hook scripts functionality. This opens up so many possibilities for Chocolatey CLI users!

Watch On-Demand
Chocolatey Coding Livestream

Livestream from
Tuesday, 29 November 2022

Join Josh as he adds the ability to manage Chocolatey GUI config and features with the Chocolatey Ansible Collection.

Watch On-Demand
Introduction into Chocolatey with Veeam

Webinar from
Tuesday, 13 December 2022

Join Gary, Paul, and Maurice as they introduce and demonstrate how to use Chocolatey! Questions will be answered live in an Ask Me Anything format.

Watch On-Demand

Downloads:

15,998

Downloads of v 4.7.0:

450

Last Update:

28 Nov 2023

Package Maintainer(s):

Software Author(s):

  • Wazuh Inc.

Tags:

Wazuh Agent

Wazuh Agent

  • 1
  • 2
  • 3

4.7.0 | Updated: 28 Nov 2023

Downloads:

15,998

Downloads of v 4.7.0:

450

Software Author(s):

  • Wazuh Inc.

Tags:

Wazuh Agent

Wazuh Agent 4.7.0

  • 1
  • 2
  • 3

All Checks are Passing

3 Passing Tests


Validation Testing Passed


Verification Testing Passed

Details

Scan Testing Successful:

No detections found in any package files

Details
Learn More

Deployment Method: Individual Install, Upgrade, & Uninstall

To install Wazuh Agent, run the following command from the command line or from PowerShell:

>

To upgrade Wazuh Agent, run the following command from the command line or from PowerShell:

>

To uninstall Wazuh Agent, run the following command from the command line or from PowerShell:

>

Deployment Method:

NOTE

This applies to both open source and commercial editions of Chocolatey.

1. Enter Your Internal Repository Url

(this should look similar to https://community.chocolatey.org/api/v2/)


2. Setup Your Environment

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

2. Get the package into your environment

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://community.chocolatey.org/api/v2/. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Copy Your Script

choco upgrade wazuh-agent -y --source="'INTERNAL REPO URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade wazuh-agent -y --source="'INTERNAL REPO URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Install wazuh-agent
  win_chocolatey:
    name: wazuh-agent
    version: '4.7.0'
    source: INTERNAL REPO URL
    state: present

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.


chocolatey_package 'wazuh-agent' do
  action    :install
  source   'INTERNAL REPO URL'
  version  '4.7.0'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


cChocoPackageInstaller wazuh-agent
{
    Name     = "wazuh-agent"
    Version  = "4.7.0"
    Source   = "INTERNAL REPO URL"
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'wazuh-agent':
  ensure   => '4.7.0',
  provider => 'chocolatey',
  source   => 'INTERNAL REPO URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


4. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

Package Approved

This package was approved as a trusted package on 28 Nov 2023.

Description

Wazuh helps you to gain deeper security visibility into your infrastructure by monitoring hosts at an operating system and application level.

Package Parameters

  • ApplicationFolder: Sets the installation path. Default C:\Program Files (x86)\ossec-agent.
  • Manager: Specifies the managers IP address or hostname. This option also accepts a list of IPs or hostnames separated by semicolons.
  • ManagerPort: Specifies the managers connection port.
  • Protocol: Sets the communication protocol between the manager and the agent. Accepts UDP and TCP. Default is UDP.
  • RegistrationServer: Specifies the Authd IP address.
  • RegistrationPort: Specifies the Authd connection port.
  • RegistrationPassword: Sets the Authd password.
  • KeepAliveInterval: Sets the time between manager checks.
  • TimeReconnect: Sets the time in seconds until a reconnection attempt.
  • RegistrationCA: Specifies the path of the certificate authority.
  • RegistrationCertificate: Specifies the certificate path.
  • RegistrationKey: Specifies the key path.
  • AgentName: Designates the agent's name. By default will be the computer name.
  • AgentGroup: Assigns the agent to one or more existing groups (separated by commas).

Installation

Installation without parameters.

 choco install wazuh-agent

Installation with parameters.

 choco install wazuh-agent --params="'/Manager:192.168.1.5 /AgentName:Chocolatey'"

tools\chocolateyuninstall.ps1
$ErrorActionPreference = 'Stop';

$packageArgs = @{
    packageName    = $env:ChocolateyPackageName
    softwareName   = ''
    fileType       = ''
    silentArgs     = ''
    validExitCodes = @(0, 3010, 1605, 1614, 1641)
}

if ($key.Count -eq 1) {
    $key | ForEach-Object {
        $packageArgs['file'] = "$($_.UninstallString)"
        if ($packageArgs['fileType'] -eq 'MSI') {
          $packageArgs['silentArgs'] = "$($_.PSChildName) $($packageArgs['silentArgs'])"
          $packageArgs['file'] = ''
        }
        Uninstall-ChocolateyPackage @packageArgs
    }
} elseif ($key.Count -eq 0) {
    Write-Warning "$packageName has already been uninstalled by other means."
} elseif ($key.Count -gt 1) {
    Write-Warning "$($key.Count) matches found!"
    Write-Warning "To prevent accidental data loss, no programs will be uninstalled."
    Write-Warning "Please alert package maintainer the following keys were matched:"
    $key | ForEach-Object {Write-Warning "- $($_.DisplayName)"}
}

# Custom settings from package
## Remove files and folders
if (Get-Item -Path "<Path>" -ErrorAction SilentlyContinue) {
    Remove-Item `
        -Path "<Path>" `
        -Recurse
    Write-Output `
        -InputObject "Remove Shortcut <Path>"
}
tools\helpers.ps1
function Test-RegistryValue {

    param (
        [parameter(Mandatory = $true)][ValidateNotNullOrEmpty()]$Path,
        [parameter(Mandatory = $true)][ValidateNotNullOrEmpty()]$Value
    )

    try {
        Get-ItemProperty -Path $Path | Select-Object -ExpandProperty $Value -ErrorAction Stop | Out-Null
        return $true
    }
    catch {
        return $false
    }

}

function Remove-FileItem {

    param (
        [parameter(Mandatory = $true)][ValidateNotNullOrEmpty()]$Path
    )

    try {
        Remove-Item `
            -Path $Path `
            -Recurse
        Write-Output `
            -InputObject "Remove $($Path)"
    
    }
    catch {
        Write-Output `
            -InputObject "Failed remove $($Path)"
    }

}

function Update-RegistryValue {

    param (
        [parameter(Mandatory = $true)][ValidateNotNullOrEmpty()]$Path,
        [parameter(Mandatory = $true)][ValidateNotNullOrEmpty()]$Name,
        [parameter(Mandatory = $true)][ValidateNotNullOrEmpty()]$Value,
        [parameter(Mandatory = $true)][ValidateNotNullOrEmpty()]$Type,
        [parameter(Mandatory = $true)][ValidateNotNullOrEmpty()]$Message
    )

    try {
        Set-ItemProperty `
            -Path $Path `
            -Name $Name `
            -Value $Value
        Write-Output `
            -InputObject $Message
      
    
    }
    catch {
        New-ItemProperty `
            -Path $Path `
            -Name $Name`
        -PropertyType $Type `
            -Value $Value
        Write-Output `
            -InputObject $Message
    }

}

function Set-CleanInstall {

    try {
        Get-ChildItem "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\.." -recurse -Exclude '*.ps1', '*pm1' |
            Where-Object {$_.Length -gt 1gb} |
            Remove-Item
        return $true
    }
    catch {
        return $false
    }

}

function Remove-DesktopIcons {

    param (
        [parameter(Mandatory = $true)][ValidateNotNullOrEmpty()]$Name,
        [parameter(Mandatory = $false)]$Desktop
    )
    if (!$Desktop) {
        $Desktop = 'All' 
    }
    if ($Desktop -eq 'All') {
        foreach ($User in Get-ChildItem -Path "C:\Users") {
            Remove-FileItem -Path "C:\users\$($User)\desktop\$($Name).lnk"
        }
        Remove-FileItem -Path "C:\Users\default\desktop\$($Name).lnk"
        Remove-FileItem -Path "C:\Users\Public\Desktop\$($Name).lnk"
    }
    elseif ($Desktop -eq 'Public') {

        Remove-FileItem -Path "C:\Users\Public\Desktop\$($Name).lnk"

    }
    elseif ($Desktop -eq 'Default') {

        Remove-FileItem -Path "C:\Users\Default\desktop\$($Name).lnk"

    }

}
tools\chocolateyinstall.ps1
$ErrorActionPreference = 'Stop';
$PackageParameters = Get-PackageParameters

$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)"
$urlPackage = 'https://packages.wazuh.com/4.x/windows/wazuh-agent-4.7.0-1.msi'
$checksumPackage = 'fede82d16c27c8d947bcb8dfba95314afb8578707afd6ee2ba4d3891d0f5404d226a3fd9a2ffafbfad63d4259376a66a0d5456ef721c831e2bcd12ec0d9de6f3'

Import-Module -Name "$($toolsDir)\helpers.ps1"

$args = ""

if ($PackageParameters['ApplicationFolder']) {
    $args = $args + " APPLICATIONFOLDER=" + $PackageParameters['ApplicationFolder']
}

if ($PackageParameters['Manager']) {
    $args = $args + " WAZUH_MANAGER=" + $PackageParameters['Manager']
}

if ($PackageParameters['ManagerPort']) {
    $args = $args + " WAZUH_MANAGER_PORT=" + $PackageParameters['ManagerPort']
}

if ($PackageParameters['Protocol']) {
    $args = $args + " WAZUH_PROTOCOL=" + $PackageParameters['Protocol']
}

if ($PackageParameters['RegistrationServer']) {
    $args = $args + " WAZUH_REGISTRATION_SERVER=" + $PackageParameters['RegistrationServer']
}

if ($PackageParameters['RegistrationPort']) {
    $args = $args + " WAZUH_REGISTRATION_SERVER=" + $PackageParameters['RegistrationPort']
}

if ($PackageParameters['RegistrationPassword']) {
    $args = $args + " WAZUH_REGISTRATION_PASSWORD=" + $PackageParameters['RegistrationPassword']
}

if ($PackageParameters['KeepAliveInterval']) {
    $args = $args + " WAZUH_KEEP_ALIVE_INTERVAL=" + $PackageParameters['KeepAliveInterval']
}

if ($PackageParameters['TimeReconnect']) {
    $args = $args + " WAZUH_TIME_RECONNECT=" + $PackageParameters['TimeReconnect']
}

if ($PackageParameters['RegistrationCA']) {
    $args = $args + " WAZUH_REGISTRATION_CA=" + $PackageParameters['RegistrationCA']
}

if ($PackageParameters['RegistrationCertificate']) {
    $args = $args + " WAZUH_REGISTRATION_CERTIFICATE=" + $PackageParameters['RegistrationCertificate']
}

if ($PackageParameters['RegistrationKey']) {
    $args = $args + " WAZUH_REGISTRATION_KEY=" + $PackageParameters['RegistrationKey']
}

if ($PackageParameters['AgentName']) {
    $args = $args + " WAZUH_AGENT_NAME=" + $PackageParameters['AgentName']
}

if ($PackageParameters['AgentGroup']) {
    $args = $args + " WAZUH_AGENT_GROUP=" + $PackageParameters['AgentGroup']
}

Write-Output $args

$packageArgs = @{
    packageName    = $env:ChocolateyPackageName
    fileType       = 'msi'
    url            = $urlPackage
    checksum       = $checksumPackage
    checksumType   = 'SHA512'
    url64          = $urlPackage
    checksum64     = $checksumPackage
    checksumType64 = 'SHA512'
    silentArgs     = "$($args) /q"
    ValidExitCodes = @(0, 1000, 1101)
}

Install-ChocolateyPackage @packageArgs

if ($PackageParameters.CleanStartmenu) {
    Remove-FileItem `
        -Path "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\OSSEC"
}

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Add to Builder Version Downloads Last Updated Status
Wazuh Agent 4.6.0 686 Tuesday, October 31, 2023 Approved
Wazuh Agent 4.5.4 442 Tuesday, October 24, 2023 Approved
Wazuh Agent 4.5.3 494 Friday, October 13, 2023 Approved
Wazuh Agent 4.5.2 1157 Friday, September 8, 2023 Approved
Wazuh Agent 4.5.1 525 Saturday, August 26, 2023 Approved
Wazuh Agent 4.5.0 615 Sunday, August 13, 2023 Approved
Wazuh Agent 4.4.5 741 Tuesday, July 11, 2023 Approved
Wazuh Agent 4.4.4 583 Thursday, June 15, 2023 Approved
Wazuh Agent 4.4.3 334 Sunday, May 28, 2023 Approved
Wazuh Agent 4.4.2 130 Friday, May 19, 2023 Approved
Wazuh Agent 4.4.1 421 Wednesday, April 12, 2023 Approved
Wazuh Agent 4.4.0 253 Wednesday, March 29, 2023 Approved
Wazuh Agent 4.3.10 742 Friday, February 10, 2023 Approved
Wazuh Agent 4.3.9 594 Saturday, October 15, 2022 Approved
Wazuh Agent 4.3.8 365 Tuesday, September 20, 2022 Approved
Wazuh Agent 4.3.7 151 Friday, September 2, 2022 Approved
Wazuh Agent 4.2.7 626 Tuesday, May 31, 2022 Approved
Wazuh Agent 4.2.6 302 Wednesday, April 27, 2022 Approved
Wazuh Agent 4.2.2 1208 Tuesday, October 12, 2021 Approved
Wazuh Agent 4.0.3 930 Thursday, December 3, 2020 Approved
Wazuh Agent 3.13.2 337 Monday, October 5, 2020 Approved
Wazuh Agent 3.13.1 1604 Thursday, August 6, 2020 Approved
Wazuh Agent 3.11.3 1123 Tuesday, February 11, 2020 Approved
Wazuh Agent 3.10.2 420 Saturday, December 7, 2019 Approved
Wazuh Agent 2.1.1 765 Monday, October 30, 2017 Approved

This package has no dependencies.

Discussion for the Wazuh Agent Package

Ground Rules:

  • This discussion is only about Wazuh Agent and the Wazuh Agent package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Wazuh Agent, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus