Install PowerShell commands for Office 365

Previously, it was not possible to install the SharePoint Online Management Shell directly from PowerShell. From the Microsoft site, an installation file had to be downloaded. For completeness: Go to the site.

Fortunately, it is now possible to download and install the SharePoint Online Management Shell from PowerShell. I am always looking for the code. Hopefully, the following is also useful for you. Copy and paste the following into PowerShell (turn it on as administrator) and run. Click on "yes" or "Yes to all".


Install Module SharePointPnPPowerShellOnline
Install Module MSOnline
Install Module AzureAD
Install-Module Microsoft. Online. SharePoint. PowerShell-Force
Install-Module-Name Microsoft teams
Install-Module CredentialManager-Force

In addition to installing, we can now also perform updates.
Again, we need to run PowerShell as an administrator.

Update Module SharePointPnPPowerShellOnline
Update Module MSOnline
Update Module AzureAD
Microsoft. Online. SharePoint. PowerShell Update Module
Update Module-Name Microsoft teams
Update-Module CredentialManager-Force

Fun.