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

Sign-in assistant (needed for MSOL and AzureAD Modules)

Microsoft Online (1.1.183.57)
Original Tenant Directory Management
Prefix: MSOL
Install-Module -Name MSOnline

AzureAD (2.0.2.76)
Newer Tenant Directory Management
Prefix: AzureAD
Install-Module -Name azuread

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

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

Teams
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 (1.1.6)
(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.3)
Manage Exchange Online without PSRemoting
Prefix: EXO
Install-Module -Name ExchangeOnlineManagement
Connect to Exchange Online PowerShell​

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

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

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


3rd Party Installs

SharePoint PnP PowerShell (3.24.2009.1)
Essential to manage SharePoint and related technologies
Install-Module -Name SharePointPnPPowerShellOnline

Last Updated 9/24/2020

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

tk

ShortUrl: https://www.toddklindt.com/POSHOffice365Modules

Comments

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 ....so 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.

Script#1
+++++++

# 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={$_.Usage.storage/1MB}} |

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

}


===No luck

Script#2
+++++++++

#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 = $excel.workbooks.open($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
#$myArray
#print $myarry object with foreach loop
foreach ($x in $myArray)
{
    Get-SPSite $x| Select-Object url,

@{n="Database";e={$_.ContentDatabase.Name}}, @{n="SizeInMB";e={$_.Usage.storage/1MB}} |

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

}

$excel.Quit()

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

===No luck too


Thanks in advance
Sashank
 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"

THX
Sashank
 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

Hi,
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.
tk
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)
dk
 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. :)

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

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.

Title


Body *


Today's date *

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

Twitter


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

Attachments

 

 SysKit