Skip to main content

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

Monitor Setup Location

Monitors Path: ENDPOINTSAlertsMonitors

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

Image1

Targeted Resources

  • Target Type: Device Groups
  • Group Name: ImmyBot Agent Deployment Enabled

Image2

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

Image3

Ticket Resolution

Automatically resolve: False

Image4

Monitor Output

Output: Do not Generate Ticket

Image5

Completed Monitor

Image6