If you want to manage Azure Active Directory or Microsoft 365 apps you need to install the PowerShell module on your computer.

PowerShell is an automation and configuration management command-line shell you can use on your Windows 10/11.

PowerShell is a powerful administration tool that allows automated administration of Office 365 applications like Active Directory, SharePoint, Exchange, etc. Learn how to install a specific PowerShell module on your Windows 10/11 computer and start the journey with PowerShell programming.

Learn how to install the PowerShell module to manage Microsoft 365 through the command-line shell.

Install Microsoft PowerShell modules on Windows PC computer

PREPARE FOR GENERATIVE AI ERA

Prepare yourself and your organization for Generative AI and Microsoft Copilot.

How to install PowerShell module in Windows 10/11

Is PowerShell included in Windows PC?

By design, Windows PowerShell is included in Windows 10 or Windows 11. You can execute PowerShell by using the Start button and searching for PowerShell.

Install Microsoft PowerShell modules on Windows PC computer

To check the version of your PowerShell use the code:

$PSVersionTable.PSVersion

You will get access to the version of the installed PowerShell.

Install Microsoft PowerShell modules on Windows PC computer

You don’t need to install PowerShell itself, but if you would like to connect to Microsoft 365 or Microsoft Azure services you will need a dedicated PowerShell module installed. To use Management Shell for Azure, Active Directory, SharePoint, Teams or Exchange you will additional modules.

 

 

How to install PowerShell Gallery

In the first step, you will need to install PowerShell Gallery – a central repository for the PowerShell modules.

Install Microsoft PowerShell modules on Windows PC computer

The PowerShell Gallery is the central repository for PowerShell content. In it, you can find PowerShell scripts, modules containing PowerShell cmdlets and Desired State Configuration (DSC) resources. Some of these packages are authored by Microsoft, and others are authored by the PowerShell community.

Technical requirements:

To install PowerShell Gallery use the below command:

Install-Module -Name PowerShellGet -Force -AllowClobber

It will execute the installation of the PowerShell Gallery module. It will take a few seconds to finalize the PowerShell module installation.

Install Microsoft PowerShell modules on Windows PC computer

How to install the PowerShell Microsoft Teams module

Learn how to add  Teams Management Shell to Windows 10/11 PowerShell. To add the Teams module to PowerShell use the command:

Install-Module -Name MicrosoftTeams -Force -AllowClobber

This command will install the Microsoft Teams module in PowerShell.

How to install the PowerShell SharePoint Online module

Learn how to add  SharePoint Management Shell to Windows 10/11 PowerShell. To add the SharePoint Online module to PowerShell use the command:

Install-Module -Name Microsoft.Online.SharePoint.PowerShell -Force -AllowClobber

Install-Module -Name PnP.PowerShell -Force -AllowClobber

This command will install the SharePoint Online module in PowerShell. Thanks to Maciej Stasiak for targeting the proper PnP version.

How to install the PowerShell Exchange Online module

Learn how to add  Exchange Online Management to Windows 10/11 PowerShell. To add the Exchange Online module to PowerShell use the command:

Install-Module -Name ExchangeOnlineManagement -Force -AllowClobber

This command will install the Exchange Online module in PowerShell.

How to install the PowerShell Azure Active Directory module

Learn how to add Azure Active Directory Management to Windows 10/11 PowerShell. To add the Azure Active Directory module to PowerShell use the command:

Install-Module -Name AzureAD -Force -AllowClobber

This command will install the Azure Active Directory module in PowerShell.

How to install the PowerShell Azure module

Learn how to add Azure Management to Windows 10/11 PowerShell. To add the Azure module to PowerShell use the command:

Install-Module -Name Az -Force -AllowClobber

This command will install the Azure module in PowerShell.

How to install the PowerShell OneDrive module

Learn how to add Microsoft OneDrive to Windows 10/11 PowerShell. To add the OneDrive module to PowerShell use the command:

Install-Module -Name OneDrive -Force -AllowClobber

This command will install the Microsoft OneDrive module in PowerShell.

How to install the PowerShell Power Apps module

Learn how to add Power Apps to Windows 10/11 PowerShell. To add the Power Apps module to PowerShell use the command:

Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Force -AllowClobber

Install-Module -Name Microsoft.PowerApps.PowerShell -Force -AllowClobber

This command will install the Power Apps module in PowerShell.

Resolve problems with PowerShell module installation

Errors you can meet during the installation of additional modules in PowerShell.

  • Install-Module : Administrator rights are required to install modules
Install Microsoft PowerShell modules on Windows PC computer

You need to execute the PowerShell model in admin mode. To do that find the PowerShell icon and use the right mouse button on it and select the Run as Administrator option.

Install Microsoft PowerShell modules on Windows PC computer
  • PackageManagement\Install-Package : The module ‘Name’ cannot be installed or updated because the authenticode signature of the file ‘Name.psd1’ is not valid.
Install Microsoft PowerShell modules on Windows PC computer

In such a case use additional parameter:

-SkipPublisherCheck

Like:

Install-Module -Name MicrosoftTeams -Force -AllowClobber -SkipPublisherCheck

This will resolve the problem.

  • Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files.

Use additional command to set the Execution Policy:

Set-ExecutionPolicy RemoteSigned

 

What’s next?

Great! You have learned how to install PowerShell modules on Windows 10/11. Now is the time to get a better understanding of Office 365 you can connect to. Learn how to integrate SharePoint with Teams, how to deploy Viva Learning and fix the sync issues with OneDrive.

Do you want to learn even more?
I prepared more articles that could help you get a better understanding of Power Automate, OneDrive, Microsoft Teams and SharePoint.

Conclusion

Install PowerShell module for Azure Active Directory or Microsoft 365 apps like Exchange, SharePoint, etc and automate the management of Office 365 apps.

Install Microsoft PowerShell modules on Windows PC computer