If you need to create a lot of sites (for example, setting up infrastructure for a new company or division or creating similar structures in multiple tenants), you may want to do these tasks via PowerShell:
- Download and install the latest version of the SharePoint Online Management Shell from https://go.microsoft.com/fwlink/p/?LinkId=255251.
If you have multi-factor authentication enabled for your account, you will see a modern authentication dialog box when connecting. Additionally, these examples require the SharePoint Online PowerShell module, which currently only works on Windows-based machines. It will not work on PowerShell Core at this time.
- Launch PowerShell and import the SharePoint Online module: ...