- RMM Overshell (migration 077): admin page, dispatch UI, executor/worker, target resolver, script registry (AD/DHCP/DNS/event-log/services/software/network/loglift) - LogLift evidence pipeline (migration 078): upload webhook, B2 storage client, receiver/matcher, EventLogCollector PowerShell script - IT Glue audit + write-back (migrations 075, 076): asset-audit runner, ticket xrefs, applications/configurations browse pages + apply/revert/audit endpoints - Link-aware analyzer bundles (migration 073) + provider toggle (migration 074): link-discovery service, OpenRouter LLM provider, related-tickets/itglue-suggestion panels, analyze-bundle endpoint - Endpoint data model + device-link reconciliation (migrations 079, 080): conflicts admin page, reconciler service, resolve endpoints - Dashboard overhaul: integration-health service + alerts, overview/health endpoints - Permissions: add itglue + rmm scopes; middleware: public /api/rmm/loglift route Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
/**
|
|
* get-services — list running services on the target. Asset-self.
|
|
*
|
|
* Audit purpose: when a ticket resolves by restarting/fixing a specific
|
|
* Windows service, the next tech should be able to find that service in
|
|
* the IT Glue Configuration record's operating_system_notes. The audit
|
|
* pipeline cross-references the service inventory with ticket history to
|
|
* propose notes_promotions like "Add 'BartenderProcessService' to
|
|
* operating_system_notes — referenced in T20260502.0033."
|
|
*/
|
|
|
|
import { type RmmScript, parseJsonOutput } from './types';
|
|
|
|
export const getServices: RmmScript = {
|
|
id: 'get-services',
|
|
name: 'Running services',
|
|
description:
|
|
'Snapshot of all running Windows services on the target — Name, DisplayName, StartType, ServiceType.',
|
|
target_type: 'asset_self',
|
|
expected_runtime_seconds: 15,
|
|
version: 1,
|
|
body: `
|
|
$ErrorActionPreference = 'Stop'
|
|
$services = Get-Service | Where-Object { $_.Status -eq 'Running' } |
|
|
Select-Object Name, DisplayName, StartType, ServiceType
|
|
@{
|
|
hostname = $env:COMPUTERNAME
|
|
captured_at_utc = (Get-Date).ToUniversalTime().ToString("o")
|
|
count = $services.Count
|
|
services = $services
|
|
} | ConvertTo-Json -Depth 4 -Compress
|
|
`.trim(),
|
|
parseOutput: (stdout) => parseJsonOutput(stdout),
|
|
};
|