superops_service_restart.ps1 - limehawk/rmm-scripts GitHub Wiki
superops_service_restart.ps1
Restarts SuperOps RMM agent services on Windows systems.
Overview
Restarts SuperOps RMM agent services on a Windows system. Useful for troubleshooting agent connectivity issues or applying configuration changes that require a service restart.
Purpose
This script provides a reliable way to restart SuperOps RMM agent services. It automatically discovers all SuperOps-related services and restarts them with proper error handling and detailed status reporting. This is particularly useful when troubleshooting connectivity issues or after making configuration changes.
Prerequisites
- PowerShell 5.1 or later
- Administrator privileges (required to restart services)
- SuperOps RMM agent must be installed (services must exist)
Configuration
Required Inputs
- ServicePattern: "SuperOps*" (Wildcard pattern to match SuperOps-related service names)
Settings
- Uses -Force to restart services without confirmation
- Displays verbose output during restart operation
- Automatically discovers all services matching the pattern
- Handles multiple services if multiple SuperOps services exist
Data Sources & Priority
- Windows Service Manager (Get-Service / Restart-Service)
- Hardcoded service name pattern
Behavior
- Searches for all Windows services matching the specified pattern
- Restarts each matching service found
- Displays detailed information about the restart operation
- If no matching services found, reports this and exits successfully
- Waits for services to fully restart before completing
- All-or-nothing: any failure stops the script immediately
Security Notes
- No secrets or credentials used
- Only affects SuperOps-related services
- Requires admin privileges to execute
- Does not modify service configuration (restart only)
Exit Codes
- 0: Success
- 1: Failure
Example Output
[ INPUT VALIDATION ]
--------------------------------------------------------------
Service Pattern : SuperOps*
[ OPERATION ]
--------------------------------------------------------------
Searching for services matching: SuperOps*
Found 1 service(s) to restart
Restarting service: SuperOps RMM Agent (SuperOpsAgent)
Service restart completed successfully
[ RESULT ]
--------------------------------------------------------------
Status : Success
Services Restarted : 1
[ FINAL STATUS ]
--------------------------------------------------------------
SuperOps services restarted successfully
[ SCRIPT COMPLETED ]
--------------------------------------------------------------
Version History
- v1.0.0 (2025-11-02): Initial migration from SuperOps
- Converted to Limehawk Style A format
- Added comprehensive error handling
- Added service discovery and validation
- Added structured console output
- Configurable service name pattern
Links
- View Script Source
- Scripts - Back to script index