This repository contains a series of scripts to perform descrete tasks:


This code is provided as-is without any warranty and is not sponsored by Mattermost. Please use cautiously and test before running any of these scripts against a production server.

These useful Mattermost scripts are outlined in the repository’s README file ( and include:

  • Get all deactivated users
  • Get last login time for all users
  • Get number of posts in public and private channels
  • Get posts by team and channel
  • Get user’s last activity at
  • Get users in channels
  • Get users in teams