sync: auto-sync from HOWARD-HOME at 2026-07-07 20:31:16

Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-07-07 20:31:16
This commit is contained in:
2026-07-07 20:31:47 -07:00
parent 9340cdec17
commit a2a277ab67
8 changed files with 200 additions and 13 deletions

View File

@@ -58,6 +58,37 @@ This is the headline use case - set a device for SC and have it land correctly:
VERIFIED end-to-end on RMM-TEST-MACHINE 2026-06-22 (installed, self-tagged
Company/Site/Tag, ran a command, re-tagged via set-properties).
### Deploying the GuruRMM agent via SC (verified 2026-07-08)
Different from the SC-installer push above: to enroll a box that is in SC but NOT in GuruRMM,
`send-command` the server's own site-preconfigured one-liner. The site code is baked into the
downloaded signed binary (GRMM_CFG trailer) so it self-enrolls straight into that site — no
Staging, no reassign:
```bash
# site_code from GET /api/sites/<id>/install-info (e.g. Main = INNER-BRIDGE-8354)
CMD='powershell -NoProfile -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; iex (irm '\''https://rmm.azcomputerguru.com/install/<SITE_CODE>/windows'\'')"'
$SC send-command --session <sessionID> --command "$CMD" --confirm
```
The install script auto-relaunches into native 64-bit PowerShell (handles SC's 32-bit command
runner via Sysnative). Verified: DESKTOP-NFU17AJ enrolled into IMC → Main this way 2026-07-08.
- **`send-command` returns `{}`** — SC gives no command output via the API (documented below).
It is queued, not confirmed. **Verify by enrollment**, not by the send response: poll
`rmm-search.sh -c <client>` for the new agent (pipe `--json` with `2>/dev/null` — the `[OK]
Authenticated` banner is on stderr; `2>&1 | jq` breaks jq).
- **Offline targets:** the one-liner is a single self-contained command, so it queues in the
session's one event slot and runs on reconnect. It will NOT run until the box is online.
- **Gotcha:** the install script calls `Get-CimInstance Win32_Processor`; a box with corrupt
WMI dies there (bit CP-QB). A box that black-holes outbound TLS installs but never connects
(bit IMC-PRINTSERVER) — SC still works because its relay is not TLS.
- **CP values are under `.CustomProperties.CustomPropertyN` / `.CustomPropertyValues[]`** on the
raw session object (CP1=Company, CP2=Site, ...). `--company "X"` matches CP1 **exactly**, so
pass the full tagged value (IMC's CP1 is `IMC - Instrumental Music Center`, not `Instrumental
Music Center`) or enumerate with `--like` / a raw `CustomProperty1 = '...'` filter first.
SC truncates session Name to 15 chars — `IMC-M-EDSERVICE` (SC) is `IMC-M-EdServices1` (RMM).
## Method surface (probed live 2026-06-22)
**Available (CLI-exposed):**