• Topics
    • Office 365
    • Teams
    • SharePoint
    • Exchange 2019
    • Exchange 2016
    • Exchange 2013
    • Hybrid
    • Certificates
    • PowerShell
    • Migration
    • Security
    • Azure
  • Blog
  • The Practical 365 Podcast
  • Books
  • Community
  • About
  • Subscribe
    • Facebook
    • Twitter
    • RSS
    • YouTube

Practical 365

You are here: Home / Blog / PowerShell Scripts for Office 365

PowerShell Scripts for Office 365

December 13, 2017 by Paul Cunningham 6 Comments

As Office 365 admins we have the opportunity to use PowerShell for a wide variety of administration tasks. PowerShell scripts make it possible to automate complex and routine tasks, which saves time and reduces operator error.

You can find a lot of PowerShell scripts online that MVPs and others in the Office 365  community have developed and shared. In this article, I'll share a selection of Office 365 PowerShell scripts that I think are useful for all of us.

Where to Start with PowerShell

If you're new to PowerShell then you might find it difficult to make use of these scripts without a little help. Most of them are user friendly and quite straightforward to use, but if you run into any problems you can leave a comment on the script creator's blog or TechNet Gallery submission for help. Everyone wants their scripts to be useful, so they're usually quick to respond.

If you're looking for PowerShell learning resources, here are my recommendations:

  • Learn Windows PowerShell in a Month of Lunches
  • PowerShell Learning Path on Pluralsight

Office 365 Connection Script

MVP Michel de Rooij has developed this Office 365 connection script that contains functions for connecting to individual Office 365 services such as Exchange Online, Azure AD, Skype, Teams, and more. Be sure to read Michel's instructions on how to add the script to your PowerShell profile so that the functions are always available when you start a new PowerShell console.

More info: Michel's blog | Download

Azure AD Connect Sync Report

This script by MVP Michael “Van Hybrid” Van Horenbeeck will generate a report for your Azure AD Connect server, showing you some useful system information as well as the recent sync history. Note, there is a dependency on the SQL Server PowerShell module for this script to work. You will either need the SQLPS or SQLServer module installed on your server. The script checks for the presence of the SQLPS module, so check the GitHub repo for a fix if you run into issues.

More info: TechNet Gallery | GitHub

License Reconciliation Report

This script by MVP Alan Byrne from Cogmotive will generate a CSV file containing the license assignment information for your user accounts. This is useful for managing licensing costs for your organization.

More info: TechNet Gallery

AZCopy GUI for PST Imports

This script by MVP Chris Goosen adds a GUI for the AzCopy tool to make PST migrations using the Office 365 Import Service easier to deal with.

More info: Chris' blog | TechNet Gallery

Other PowerShell Scripts for Office 365

In addition to those contributions from others, here's a list of my own PowerShell scripts that work with Office 365.

  • Saving Credentials for Office 365 PowerShell Scripts and Tasks
  • Office 365 Message Center Email Digest
  • Office 365 Admin Role Group Members Report
  • Generate Reports for New, Changed, and Deleted Office 365 Groups
  • Bulk Add SMTP Addresses to Exchange Online Mailboxes
  • Test Federated Domain Proof TXT Record for Hybrid Deployments
  • Deploy the Microsoft Teams Client
  • Deploy Office 365 ProPlus from a Network Share
Paul Cunningham

Paul is a Microsoft MVP for Office Apps and Services and a Pluralsight author. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server.

Blog AAD Connect, Import Service, Licenses, PowerShell, PST, Scripts

Comments

  1. Manish Gupta says

    October 30, 2018 at 7:57 pm

    Hi, Great post!!!

    Well, I was also, looking for a PowerShell script to export Office 365 mailbox to PST. I found several scripts but all they have written was not of any use.

    Hope, you will help me!!

    Reply
  2. SANKARASUBRAMAN PARAMESWARAN says

    May 2, 2018 at 6:30 am

    I need to create audit log report for office365. do you have script to do this

    Reply
  3. Ben says

    December 27, 2017 at 1:56 pm

    Wow, what a Christmas gift!!! Thanks Paul. Have a productive year ahead.

    Reply
  4. Tore Melberg says

    December 21, 2017 at 10:22 pm

    Excelent collection, Thanks for summing this up.

    Reply
  5. Jeremy B says

    December 20, 2017 at 12:27 am

    Very nice collection of goodies. Thanks!

    Reply

Leave a Reply Cancel reply

You have to agree to the comment policy.

Recent Articles

  • The Practical 365 Podcast Ep 3: New Data Centers, Teams and more
  • Build your own custom SharePoint document library bulk provisioning system using the PowerPlatform – Part 1
  • Build your own custom SharePoint document library bulk provisioning system using the PowerPlatform – Part 2
  • The Practical 365 Podcast Ep 2: Azure AD, Message Center Updates, and Roadmap
  • The Practical 365 Podcast: Episode 01 – Exchange Updates and Roadmap
Practical 365

Related Posts

Deploying the Microsoft Teams Desktop Client
How to silently deploy the Microsoft Teams desktop client using a PowerShell script and Group
PowerShell Script for TroubleShooting Exchange ActiveSync Devices
EAS Troubleshooter helps you to troubleshoot Exchange ActiveSync device problems by collecting relevant information about
Help Test V1.02 of the Office 365 Groups Report Script
Help test V1.02 Beta of Get-O365GroupsReport.ps1 script which includes new features for reporting on recoverable

Training Courses

  • Configuring and Managing Office 365 Security
  • Office 365 Admin Playbook
  • Exchange 2016 Exam 70-345
  • Managing Exchange Mailboxes and Distribution Groups in PowerShell
  • More Training Courses...

Recommended Resources

  • Office 365 Security Resources
  • Office 365 Books
  • Exchange Server Books
  • Exchange Server Migrations
  • Exchange Analyzer
  • Digicert SSL Certificates

About This Site

Practical 365 is a leading site for Office 365 and Exchange Server news, tips and tutorials. Read more...

Find out more about advertising with us.

Contact us


Subscribe to our newsletter
  • Facebook
  • Twitter
  • RSS
  • YouTube

Copyright © 2019 Quadrotech Solutions AG · Disclosure · Privacy Policy
Alpenstrasse 15, 6304 Zug, Switzerland