MS Office 365

Install most important Office 365 PowerShell modules

Office 365 PowerShell modules Introduction

Office 365 includes a many of services like Azure AD, SharePoint Online, Exchange Online, Security and Compliance Center, One Drive, and Teams. To manage this services, you need to navigate different admin portals as each service has different portals.

  • Office 365 PowerShell is a powerful tool that instead of the Microsoft 365 admin center.
  • With Office 365 PowerShell modules, you can manage all Office 365 services faster than the admin portal, Sometimes it’s the only way
  • Each Office 365 service has it’s own PowerShell module, which allows you to administrate all services under a single PowerShell window.
  • To manage Office 365 services through PowerShell, first you need to install the required module. Let’s see the available Office 365 services’ PowerShell modules one by one.

Exchange Online PowerShell (EXO V2)

  • Exchange Online PowerShell allows you to manage your Exchange Online settings from the cmd.
  • EXO V2 module uses modern authentication to connect to Exchange Online.
  • To install Exchange Online PowerShell Version 2 (EXO V2), you can use below cmdlet.

Azure AD (AzureAD and MSOnline Module)

  • Allows you to connect to your Office 365 organization to perform administration task

AzureAD V1 (MSOnline Module)

  • Cmd-lets in the Microsoft Azure Active Directory Module for Windows PowerShell have ‘Msol’ in their cmd-let name like Get-MsolUser, Get-MsolDomain, etc.

AzureAD V2 (AzureAD Module)

  • Cmd-lets in the Azure Active Directory PowerShell for Graph module have ‘AzureAD’ in their cmd-let name like Get-AzureADUser, New-AzureADPolicy, etc. Install-Module –Name AzureAD

SharePoint Online (SharePoint Online PowerShell Module)

  • SharePoint Online PowerShell module allows you to manage sites, site groups and users, etc.
  • To manage SharePoint Online through PowerShell, you must install SharePoint Online PowerShell Module.

SharePoint PnP (SharePoint PnP PowerShell Module)

  • SharePoint Patterns and Practices (PnP) allows you to perform complex provisioning and artifact management actions in the SharePoint.
  • To install SharePoint PnP, you can run the below cmdlet.

Security and Compliance Center (Exchange Online PowerShell Module – EXO V2)

  • Security and Compliance Center PowerShell is the administrative interface that allows you to perform compliance searches and configure access to Security and Compliance Center.
  • You need to install EXO V2 module in order to access Security and Compliance Center. Install-Module ExchangeOnlineManagement

Teams (Microsoft Teams PowerShell Module)

  • Microsoft Teams PowerShell Module allows you to create and manage Teams. To connect Teams through PowerShell, you need to install Microsoft Teams PowerShell Module.
  • You can install Microsoft Teams PowerShell Module using the below cmd-let Install-Module –Name MicrosoftTeams

PowerShellGet module

Microsoft Graph module

Microsoft Graph Beta module

For detailed usage of this script, you can check the use cases given at the bottom.

Script Highlights:

  • Modules required for Office 365 services are automatically downloaded and installed upon your confirmation.
  • You can connect to one or more Office 365 services via PowerShell using a single cmdlet.
  • You can connect Office 365 services with MFA enabled account.
  • For non-MFA account, you don’t need to enter credential for each service. The credential popup will be prompted only once.
  • The script is scheduler friendly. i.e., credentials can be passed as a parameter instead of saving inside the script.
  • You can disconnect all service connections using a single cmdlet.

Now you can see How-to: Connect to Exchange Online PowerShell | Best Practices

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
TOC ......