add nxlog

This commit is contained in:
Hubert Cornet 2024-07-07 08:19:22 +02:00
parent 0b373d31db
commit 6d1b5d2f58
2 changed files with 22 additions and 0 deletions

3
nxlog/README.md Normal file
View File

@ -0,0 +1,3 @@
# Applications
Applications

19
nxlog/nxlog_setup.ps1 Normal file
View File

@ -0,0 +1,19 @@
#
$fichier1 = "nxlog-ce-3.2.2329.msi"
$url1 = "https://nxlog.co/system/files/products/files/348/nxlog-ce-3.2.2329.msi"
$file1 = "C:\tmp\"+$fichier1
$url2 = "https:///nxlog.conf"
$file2 = "C:\Program Files\nxlog\conf\nxlog.conf"
$SERVER_IP = Read-Host -Prompt 'What is the IP of your syslog server? '
# Download and install nxlog
(New-Object -TypeName System.Net.WebClient).DownloadFile($url1, $file1)
Start-Process C:\Windows\System32\msiexec.exe -ArgumentList "/i $file1 /q" -wait
# Download and modify nxlog configuration and restart nxlog
(New-Object -TypeName System.Net.WebClient).DownloadFile($url2, $file2)
(Get-Content "C:\Program Files (x86)\nxlog\conf\nxlog.conf").replace("CHANGEME", $SERVER_IP) | Set-Content $file2
Restart-Service -Name nxlog