We have several Veeam Proxies and I want to automate the OS patching while ensuring that the proxy is not running a job.
I am thinking the best way to do this is with Windows Task Scheduler and run a script. I want the script to check if that proxy is processing any Veeam jobs, then patch the OS and reboot or sleep and retry. I cant seem to figure out the proper way to check if the proxy is in use or not. Whats the best way to do this?
I am thinking the best way to do this is with Windows Task Scheduler and run a script. I want the script to check if that proxy is processing any Veeam jobs, then patch the OS and reboot or sleep and retry. I cant seem to figure out the proper way to check if the proxy is in use or not. Whats the best way to do this?
Code:
$serviceStatus = Get-Service -Name "Veeam Data Mover Service"# Check if the service is runningif ($serviceStatus.Status -eq "Running") { # Get the current jobs $jobs = Get-VBRJob | Where-Object {$_.State -eq "Running"} # Check if any jobs are running if ($jobs.Count -gt 0) { Write-Output "Veeam Data Mover is processing jobs." } else { Write-Output "Veeam Data Mover is running but not currently processing any jobs." }} else { Write-Output "Veeam Data Mover service is not running."}Statistics: Posted by jasonp26 — Dec 19, 2024 4:04 pm







