How to Refresh the RMM Customer List (CSV + Excel)¶
All RMM tooling lives in engine/rmm/. The customer list (RMM_Site_Tokens.csv and RMM_Site_Tokens.xlsx) is a snapshot of
every site and its permanent Agent Token. You only need to refresh it when:
- a new customer/site is added in ConnectWise RMM,
- a site's agent token is regenerated, or
- a company/site is renamed.
Day-to-day installer building (Build-RMMInstaller.ps1) just reads the static list and
needs no refresh and no login.
One-time setup (enables automatic Excel output)¶
Open PowerShell and run this once (no admin rights needed):
Install-Module ImportExcel -Scope CurrentUser -Force
This lets the refresh script write the .xlsx automatically. If you skip it, the refresh
still updates the .csv — you'd just open that in Excel and "Save As" .xlsx yourself.
Refreshing the list¶
Step 1 — Get a fresh portal session cookie¶
The refresh talks to the portal as "you", so it needs your current login.
- In Chrome or Edge, sign in to https://control.itsupport247.net.
- Press F12 to open Developer Tools, click the Network tab.
- In the filter box type
graphql. - Click around the portal once (e.g. open Devices) so a
GraphQL/row appears. - Click that
GraphQL/row → Headers → scroll to Request Headers. - Find the line starting
cookie:and copy the entire value (it starts withLastAccessedTabEmailIdOLD=and ends withiPlanetDirectoryPro=...).
Step 2 — Paste it into the script¶
- Open
Refresh-RMMTokens.ps1in a text editor. - Near the top, replace the placeholder on this line with what you copied:
powershell $CookieHeader = "PASTE_FULL_COOKIE_STRING_HERE" - Save the file.
Step 3 — Run it¶
In PowerShell, from the engine\rmm folder:
.\Refresh-RMMTokens.ps1
It will:
- pull every site (with numeric Client/Site IDs),
- look up each site's current Windows MSI token,
- overwrite RMM_Site_Tokens.csv, and
- rebuild RMM_Site_Tokens.xlsx (if ImportExcel is installed).
You'll see a count of rows written and the file paths.
Step 4 — Clean up¶
The cookie is live credentials. After a successful run, clear it back out of the
script (set the line back to "PASTE_FULL_COOKIE_STRING_HERE") so a real session token
isn't left sitting in the file.
Notes & troubleshooting¶
- "cookie expired" / site query failed → the cookie only lasts ~12 hours. Grab a fresh one (Step 1) and run again.
- Excel didn't update, CSV did → the
ImportExcelmodule isn't installed. Do the one-time setup above, or open the CSV and Save As.xlsx. - A customer is missing → confirm it exists under Devices in the portal, then refresh.
- Why not a proper API key? The supported ConnectWise OpenAPI authenticated fine but
returned 403 on the customer/site listing regardless of scopes, and exposes no agent-token
endpoint for this tenant. The portal's own GraphQL (used here) is the only working source,
and it authenticates by browser session — hence the cookie step. See
RMM-Installer-Automation-Guide.mdfor the full background.