Skip to content

Instantly share code, notes, and snippets.

@M-ZubairAhmed
Last active November 8, 2023 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save M-ZubairAhmed/adb081d21f38c67e54554c725390115a to your computer and use it in GitHub Desktop.
Save M-ZubairAhmed/adb081d21f38c67e54554c725390115a to your computer and use it in GitHub Desktop.
Create multiple Mattermost channels without being in each of them
# Run this bash file inside of mmctl directory or replace ./mmctl with the path to mmctl
for i in {1..100}
do
# First command creates a channel with user included in the channel
./mmctl channel create --team XXXTeamNameXXX --display-name "${i}-channel" --name "${i}-channel"
# Second command removes all the users from the created channel
./mmctl channel users remove "XXXTeamNameXXX:${i}-channel" --all-users
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment