What It Does
The script looks for 25 remote-access tools in four places: Windows services, the installed-programs list, program folders and running processes. Unless SearchPortable is false, it also looks for portable copies and downloaded installers by file name in each user's Downloads, Desktop, Documents and AppData folders, a few levels deep.
Each ScreenConnect instance is its own row, with the instance id taken from its service name, so you can tell your own instance from somebody else's. A program folder with no service, installed entry or running process is listed as a leftover of an uninstall and is not counted.
Tools you name in AllowedTools are marked allowed. The report ends OK and names tools outside your list when AllowedTools is set; use test-unapproved-remote-tools when you want an alert.
Before You Run It
- List your own tools in AllowedTools first, or every tool you use yourself is reported as not allowed.
- Some RMMs install another tool on purpose. If yours does, add that tool to AllowedTools.
- The portable search reads user folders, which takes longer on a PC with many profiles. Turn it off with SearchPortable=false for a quick run.
Type and Risk
- Type: Report. It collects facts into a table and never alerts. It exits 0, or 2 when it could not run.
- Risk: Low. It reads and changes nothing.
- Restart: It never restarts the machine.
- Typical run: Under 1 minute.
- Example answer: "2 remote-access tools: AnyDesk, ScreenConnect; not on the allowed list: AnyDesk"
- Tested before listing on Windows 11 with Windows PowerShell 5.1, run as SYSTEM, against its own test cases.
Inputs
Pass an input as an argument (-Name value), as an environment variable with the same name, which is how most RMMs pass script variables, or change its default in the param() block at the top of the script. An argument wins over an environment variable, which wins over the default.
- AllowedTools: Tools you allow, separated by commas, e.g. "ScreenConnect, TeamViewer". Wildcards work. Matched against the Tool column. Default none.
- SearchPortable: true to also search user folders for portable copies and installers. Default true.
Every script also takes DryRun, OutputFormat (Text, Answer, Json or Csv), ExportPath and ResultField, which writes the answer to an RMM custom field.
License
Provided "as is" under the MIT License, without warranty of any kind. Test before production use. MSP Outpost and User First Digital Inc. accept no liability for any damage or loss.