Skip to content

Instantly share code, notes, and snippets.

@waldekmastykarz
Created February 24, 2019 15:58
Show Gist options
  • Save waldekmastykarz/e3a211e9b4692ee634162f26c7dc30a6 to your computer and use it in GitHub Desktop.
Save waldekmastykarz/e3a211e9b4692ee634162f26c7dc30a6 to your computer and use it in GitHub Desktop.
Creates a number of modern team sites using the Office 365 CLI
for i in {1..10000};
do
label="$i"
if (( $i < 10 )); then
label="0$label"
fi
if (( $i < 100 )); then
label="0$label"
fi
if (( $i < 1000 )); then
label="0$label"
fi
if (( $i < 10000 )); then
label="0$label"
fi
label="PublicTeam$label"
echo "Creating $label..."
o365 spo site add --type TeamSite --alias $label --title $label --isPublic
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment