Skip Ribbon Commands
Skip to main content

Quick Launch

Todd Klindt's home page > Todd Klindt's Office 365 Admin Blog > Posts > Office 365 PowerShell Module Installs
April 01
Office 365 PowerShell Module Installs

One of the first things I do when I set up a new machine is install all of the PowerShell modules I need to manage Office 365. Since there are so many different modules, and they update so often, I put them all in this blog post so you (and I) have one place to go to to grab them I’ll. I’ll also keep the versions updated so you’ll know if you need to update them.

For each of the modules I have listed the official page if there is one, and a PowerShell command you can run to install it from the PowerShell Gallery.

To see which modules you have installed and which version they are run this:

Get-InstalledModule | select name, version

To suppress the warning you get when installing from the PowerShell Gallery, run this:

Set-PSRepository -Name PSGallery -InstallationPolicy Trusted

To update to latest version of a module use the Update-Module cmdlet. You can use the technique in this blog post, PowerShell to Update ​your PowerShell Modules​​​, to see which version you have and whether it's the latest. 

Official Microsoft Modules

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 -Name azuread

AzureADPreview (
Latest Tenant Directory Management
Prefix: AzureAD
Install-Module -Name AzureADPreview

SharePoint Online (16.0.21909.12000)
Manage SharePoint sites and related services
Prefix: SPO
Install-Module -Name Microsoft.Online.SharePoint.PowerShell

Microsoft Teams Management Preview (0.9.6) ​
(uses Graph beta/preview APIs)
Prefix: Team
Install-Module -Name MicrosoftTeams -RequiredVersion 0.9.6

Microsoft Teams Management (3.0.0)
(uses 1.0 Graph API)
Prefix: Team 
Install-Module -Name MicrosoftTeams

Skype for Business​
No PowerShell module install from Gallery
Manage Skype for Business Online with Office 365 PowerShell

Exchange Online Management​ (2.0.5)
Manage Exchange Online without PSRemoting
Prefix: EXO
Install-Module -Name ExchangeOnlineManagement
Connect to Exchange Online PowerShell​

PowerApps and Flow for Makers​ (1.0.20)
User management for Flow and PowerApps
Prefix: PowerApp (for most cmdlets)
Install-Module -Name Microsoft.PowerApps.PowerShell

PowerApps and Flow for Admins (2.0.139)
Tenant admin managent of Flow and PowerApps
Prefix: AdminPowerApp (for most cmdlets)
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell –AllowClobber ​

Graph SDK​ (1.9.0)
Beta for Microsoft Graph​
Prefix: MG
Install-Module Microsoft.Graph

3rd Party Installs

PnP.PowerShell (1.8.0)
Invaluable Module for working with SPO and M365
Install-Module -Name PnP.PowerShell​

SharePoint PnP PowerShell (3.29.2101.0) (Final Version)
Old version. Upgrade to PnP.PowerShell
Install-Module -Name SharePointPnPPowerShellOnline

Last Updated 12/12/2021

I hope this comes in handy. Let me know if there are any other modules I should consider adding.




Added to builds list?

It would be great to have this list ongoing. You should start a list (with all that free time, lol) of these that we can access like the SharePoint builds. Just a thought....
Thanks Todd! -BJ
 on 4/9/2019 12:44 PM

Re: Office 365 PowerShell Module Installs

Hi Todd
Sorry first of all iam not sure where to comment the request iam wiring here

Could you please help me in getting PS script for the following query

Source file is having list of site urls for which site size's is needed. These sites can be listed in the file at the sub site level as well.


# load file

$FilePath = 'd:\test\myfile.xlsx'

$xl = New-Object -ComObject Excel.Application

$xl.Visible = $true

$wb = $xl.Workbooks.Open($filepath)


# get data from column 2

$data = $wb.Worksheets['Sheet1'].UsedRange.Rows.Columns[2].Value2


#finding size of each value in column 2 and storing in .csv

for($i = 0; $i -lt $data.length; $i++)


Get-SPSite | Select-Object $data[$i],

@{n="Database";e={$_.ContentDatabase.Name}}, @{n="SizeInMB";e={$}} |

Export-CSV "C:\\site-collections-size.csv" -NoTypeInformation -Encoding UTF8


===No luck


#select excel file you want to read
$file = 'd:\myfile.xlsx'
$sheetName = "Sheet1"

#create new excel COM object
$excel = New-Object -com Excel.Application

#open excel file
$wb = $$file)

#select excel sheet to read data
$sheet = $wb.Worksheets.Item($sheetname)

#select total rows
$rowMax = ($sheet.UsedRange.Rows).Count

#create new object with Name, Address, Email properties.
$myData = New-Object -TypeName psobject
$myData | Add-Member -MemberType NoteProperty -Name Name -Value $null

#create empty arraylist
$myArray = @()

for ($i = 1; $i -le $rowMax; $i++)
    $objTemp = $myData | Select-Object *
    #read data from each cell
    $objTemp.Name = $sheet.Cells.Item($i,1).Text

    #Write-Host 'Name-' $objTemp.Name 'Address-' $objTemp.Address 'Email-' $objTemp.Email
    $myArray += $objTemp
#print $myarry object
#print $myarry object with foreach loop
foreach ($x in $myArray)
    Get-SPSite $x| Select-Object url,

@{n="Database";e={$_.ContentDatabase.Name}}, @{n="SizeInMB";e={$}} |

Export-CSV "C:\\site-collections-size.csv" -NoTypeInformation -Encoding UTF8



#force stop Excel process
Stop-Process -Name EXCEL -Force

===No luck too

Thanks in advance
 on 2/7/2020 8:35 AM

Required sizes for the Sharepoint sites where located in excel file

Sorry todd the tile of the issue was "Required sizes for the Sharepoint sites where located in excel file"

 on 2/7/2020 8:36 AM

Can SCA connect SPO Powershell , not as SPO admin

Hi Todd,

Hope you are well and staying safe!

Need a small suggestion here ,I have to connect to a SPO tenant using PowerShell with SCA access to run few scripts at SC level (where i dont have SPO tenant admin creds to connect )

searched a lot ,but it appears that it is only possible to connect using an account which is an SPO-admin in the given tenant.

Is there a way to assign permission to an user account (SCA), so it can connect to SPO through PowerShell?

My intention is to manipulate certain sites through PowerShell, but it is not possible for me to use the tenant admin account for it.

Thanks in advance

 on 4/21/2020 2:16 PM

Re: Can SCA connect SPO Powershell , not as SPO admin

I have bad news and good news. The bad news is that you have to have the SharePoint Admin Role assigned to you to connect to SharePoint Online with the SPO module. There's no way around that that I know of.
The good news is that the PnP PowerShell module connects at the site collection level, not the tenant level, so it does not require the SharePoint Admin Role. If your user has permission to the site collection it will connect. If you can do your manipulation with PnP PowerShell cmdlets that should work for you.

Let me know how it goes.
Todd O. KlindtNo presence information on 4/23/2020 9:45 AM

Exchange Powershell

Why does Exchange have to be different? Do you know why Exchange doesn't publish a module into PSGallery like everyone else? Having to remote into an Exchange session can be daunting in some environments and usually I am just trying to get to a command that really isn't directly for Exchange, but can only be accessed with a process that is way to complex vs. installing a module.
I have not been able to find an answer, so I though maybe you would know (or be curious enough to ask the PG)
 on 5/22/2020 6:15 AM

Great post - especially when setting up a new PC.

Big Fan. Keep updating as MS figures out modules for Exchange Online V2 which they tell us to use but only give getEXO- examples compared to the original module. Idk if to assume the rest is the same but seems dangerous.
 on 6/9/2020 9:28 AM

Re: Great post - especially when setting up a new PC.

That's great to hear. I'm glad it helps. We're all in this together. :)

Todd O. KlindtNo presence information on 6/11/2020 10:27 AM

Re: Office 365 PowerShell Module Installs

This post you're sharing is excellent. I really like and value what you've done. I really read your post, and I appreciate you providing the very useful points you raised.

 on 11/3/2023 3:33 AM

contexto game

Wordle is a popular game these days, but the Portuguese counterpart is called Contexto. You have an infinite amount of guesses in this game, but you must identify a mystery term.

 on 11/29/2023 10:03 PM
1 - 10Next

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.


Body *

Today's date *

Select a date from the calendar.
Please enter today's date so I know you are a real person


Want a message when I reply to your comment? Put your Twitter handle here.