Skip to content

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

The refresh talks to the portal as "you", so it needs your current login.

  1. In Chrome or Edge, sign in to https://control.itsupport247.net.
  2. Press F12 to open Developer Tools, click the Network tab.
  3. In the filter box type graphql.
  4. Click around the portal once (e.g. open Devices) so a GraphQL/ row appears.
  5. Click that GraphQL/ row → Headers → scroll to Request Headers.
  6. Find the line starting cookie: and copy the entire value (it starts with LastAccessedTabEmailIdOLD= and ends with iPlanetDirectoryPro=...).

Step 2 — Paste it into the script

  1. Open Refresh-RMMTokens.ps1 in a text editor.
  2. Near the top, replace the placeholder on this line with what you copied: powershell $CookieHeader = "PASTE_FULL_COOKIE_STRING_HERE"
  3. 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 ImportExcel module 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.md for the full background.