Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $Source = '\\SOMESERVER\shares\A\Wazuh\wazuh-agent-4.4.0-1.msi'
- $Destination = 'C:\Program Files (x86)\wazuh-agent-4.4.0-1.msi'
- if (Test-Path -Path $Source) {
- Write-Output "Всё хороно, начинаю установку."
- Start-Sleep -Seconds 10
- Copy-Item -Path $Source -Destination $Destination -Force; msiexec.exe /i 'C:\Program Files (x86)\wazuh-agent-4.4.0-1.msi' /q WAZUH_MANAGER='192.168.0.88' WAZUH_REGISTRATION_SERVER='192.168.0.88' WAZUH_AGENT_GROUP='Cert'
- Start-Sleep -Seconds 30
- Write-Host "Downloaded and installed"
- Start-Sleep -Seconds 3
- Write-Host "Restarting Wazuh service..."
- Start-Sleep -Seconds 3
- Restart-Service WazuhSvc
- Start-Sleep -Seconds 30
- Remove-Item 'C:\Program Files (x86)\wazuh-agent-4.4.0-1.msi'
- Start-Sleep -Seconds 5
- Write-Host "The installation is successfully completed"
- } else {
- Write-Output "В указанной директории нет данного файла. Установка не возможна!"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement