Skip to content
Snippets Groups Projects
Commit 6fe52687 authored by Andreas Lindemark's avatar Andreas Lindemark
Browse files

Previous version used an unapproved verb, fixed this.

parent 865a24a8
No related branches found
No related tags found
No related merge requests found
......@@ -7,8 +7,8 @@ $customConfigPath = "\\$domainName\SYSVOL\$domainName\scripts\zabbix_agent2.conf
# Path to the Zabbix Agent 2 configuration file
$agentConfigPath = "C:\Program Files\Zabbix Agent 2\zabbix_agent2.conf"
# Function to check if the Zabbix Agent 2 service is running
function Check-ZabbixAgent2 {
# Function to test if the Zabbix Agent 2 service is running
function Test-ZabbixAgent2 {
$service = Get-Service -Name "Zabbix Agent 2" -ErrorAction SilentlyContinue
if ($service -and $service.Status -eq 'Running') {
Write-Output "Zabbix Agent 2 is running."
......@@ -29,6 +29,6 @@ function Start-ZabbixAgent2 {
}
# Main script logic
if (-not (Check-ZabbixAgent2)) {
if (-not (Test-ZabbixAgent2)) {
Start-ZabbixAgent2
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment