ImmyBot Agent Deployment
Summary
This monitor set runs the Install ImmyBot Agent script on machines that are missing the agent and belong to the ImmyBot Agent Deployment Enabled group.
Dependencies
- Deploy ImmyBot
- ImmyBot Exclusion
- ImmyBot Exclusion
- ImmyBot Tenant
- ImmyBot Installer ID
- ImmyBot Installer Key
- ImmyBot Agent Deployment Enabled
- Install ImmyBot Agent
- ImmyBot Agent Deployment
Monitor Setup Location
Monitors Path: ENDPOINTS
➞ Alerts
➞ Monitors
Monitor Summary
- Name:
ImmyBot Agent Deployment
- Description:
This monitor set runs the "Install ImmyBot Agent" script on machines that are missing the agent and belong to the "ImmyBot Agent Deployment Enabled" group.
- Type:
Script
- Severity:
Others
- Family:
RMM Agent
Targeted Resources
- Target Type:
Device Groups
- Group Name:
ImmyBot Agent Deployment Enabled
Conditions
- Run Script on:
Schedule
- Repeat every:
24
Hours
- Script Language:
PowerShell
- Use Generative AI Assist for script creation:
False
- PowerShell Script Editor:
$ErrorActionPreference = 'SilentlyContinue'
$softwareName = 'ImmyBot Agent'
$serviceName = 'ImmyBot Agent'
function Search-Service {
[CmdletBinding()]
param (
[Parameter(Mandatory)][String]$ServiceName
)
if (Get-Service -Name $ServiceName -ErrorAction SilentlyContinue) {
return $true
} else {
return $false
}
}
function Get-ProductId {
[CmdletBinding()]
param (
[Parameter(Mandatory)][String]$SoftwareName
)
$uninstallPaths = @(
'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall',
'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall'
)
$uninstallInfo = Get-ChildItem $uninstallPaths -ErrorAction SilentlyContinue |
Get-ItemProperty |
Where-Object {
$_.DisplayName -match [Regex]::Escape($SoftwareName)
}
if ($uninstallInfo) {
return $uninstallInfo.PSChildName
} else {
return $null
}
}
$serviceCheck = Search-Service -ServiceName $serviceName
$softwareCheck = Get-ProductId -SoftwareName $softwareName
if (!$serviceCheck -or !$softwareCheck) {
return 'Not Installed or Broken'
} else {
return 'Installed'
}
- Criteria:
Contains
- Operator:
AND
- Script Output:
Not Installed
- Escalate ticket on script failure:
False
- Add Automation:
Install ImmyBot Agent
Ticket Resolution
Automatically resolve: False
Monitor Output
Output: Do not Generate Ticket