If you need to configure a new machine in order to execute o365 PS commands, this is your post. You can see similar information in Todd Klindt’s post
suppress the warning you get when installing from the PowerShell Gallery, run this:
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Official Microsoft Modules
Sign-in assistant (needed for MSOL and AzureAD Modules)
Microsoft Online
Original Tenant Directory Management
Prefix: MSOL
Install-Module -Name MSOnline
AzureAD
Newer Tenant Directory Management
Prefix: AzureAD
Install-Module azuread
AzureADPreview
Latest Tenant Directory Management
Prefix: AzureAD
Install-Module -Name AzureADPreview
SharePoint Online
Manage SharePoint sites and related services
Prefix: SPO
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
Teams
Microsoft Teams Management
Prefix: Team
Install-Module MicrosoftTeams
Skype for Business
(No PowerShell module install from Gallery)
Flow and PowerApps
Flow and PowerApps management
Prefix: No Prefix
Install-Module -Name Microsoft.PowerApps.PowerShell
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell –AllowClobber
(First module works for user, add the second module for Admin management cmdlets)
3rd Party Installs
SharePoint PnP PowerShell
Essential to manage SharePoint and related technologies
Install-Module SharePointPnPPowerShellOnline
Credential Manager
Used to create and retrieve Windows Stored Credentials
Install-Module credentialmanager
If you only need to update the modules, you can execute the follwing command: Update-Module cmdlet.