Last active
June 18, 2024 12:47
-
-
Save hkboujrida/ef6591a58ed784d39cfa7322c01dedd9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Powershell script to download and install grafana alloy in silent mode | |
# https://github.com/grafana/alloy/releases/download/v1.1.1/alloy-installer-windows-amd64.exe.zip | |
# Define the URL of the alloy installer | |
$url = "https://github.com/grafana/alloy/releases/download/v1.1.1/alloy-installer-windows-amd64.exe.zip" | |
# Define the path where the installer will be saved | |
$installerPath = "$env:TEMP\alloy-installer-windows-amd64.exe.zip" | |
# Download the installer | |
Invoke-WebRequest -Uri $url -OutFile $installerPath | |
# Extract the contents of the zip file | |
$extractPath = "$env:TEMP\alloy" | |
Expand-Archive -Path $installerPath -DestinationPath $extractPath | |
# Clean up the installer file | |
Remove-Item $installerPath | |
# Run the installer in silent mode | |
$extractPath\alloy-installer-windows-amd64.exe /S /CONFIG=$extractPath\alloy.config | |
# copy config.alloy to C:\Program Files\GrafanaLabs\Alloy\config.alloy | |
Copy-Item -Path config.alloy -Destination $env:ProgramFiles\GrafanaLabs\Alloy\config.alloy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment