Scripts - Reporting

The vast majority of these scripts are from the Microsoft TechNet Gallery and neither myself or Microsoft guarantee the validity of these scripts and you use them at your own risk.

=================================================================

Reporting Scripts

=================================================================

Office 365 Reporting Tool
Author - Robert Luck
Download - Link
This is part of the AdminDroid Office 365 Reporter product - Link

Info -
Get 500+ inbuilt report on Office 365 Users, License, Group, Group Members, Security, Mailbox Usage, Spam, Malware, Emails Sent/Received, Mail Traffic, Browser Usage, OS Usage, Mailbox Quota, Mailbox Size, Mailbox Auditing, Mailbox Forwarding, Maibox Permissions, Mailbox Protocols, ActiveSync, Mobile Devices, Mailboxes on Hold, Exchange Groups, Inbox Rules, Site Usage, Site Collection Auditing, Inactive Sites, SharePoint Admins, Guest Users, External Users, Anonymous Users, Site Group Members, PSTN Usage, Skype Conferences, Skype Active Users, Yammer Groups, Teams Channels, Device Usages, Internal/External File Sharing, Office 365 Active/Inactive Users, Pro Plus Activations, Inactive Groups etc.

Never struggle with PowerShell scripts for office 365 reports anymore. This GUI tool offers you more reporting features like scheduling, customization, exporting(CSV, HTML, PDF, XLS, XLSX) and more.

Along with these reports, this O365 reporting software offers many analytical dashboards in which you can get statistics about your Office 365 environment very easily.

=================================================================

Office 365 Auditing Report Tool
Author - Robert Luck
Download - Link

Info -
Get 200+ out-of-the-box Office 365 auditing reports on Azure AD, Exchange Online, SharePoint Online, OneDrive for Business, Microsoft Teams, Power BI, Security & Compliances. The smart auditing dashboards show the summarized activities performed on each and every O365 apps.

=================================================================

Office 365 Audit Report Tool
Author - Perumal(JiJi Technologies)
Download - Link
Website - Link

Info -
Using this Office 365 auditing tool, you can audit the following components of Office 365. - Azure ActiveDirectory - Exchange Online - SharePoint Online - OneDrive for Business - Office 365 Video.

=================================================================

Creating an interactive HTML report for Office 365.
Author - Brad Wyatt
Blog - The Lazy Administrator - http://thelazyadministrator.com
Blog Post - Link
Download - Link

Info
This script connects to Office 365 and generates a HTML report with all the important information you need at a glance, including
- Strong Password Enforcement
- Recent E-mails in your tenant
- Domains
- Groups
- Licenses
- Users
- Shared Mailboxes
- Contacts
- Mail Users
- Resource Mailboxes

=================================================================

PowerShell script to report of Office 365 Admin Roles and their members.
Author - Paul Cunningham
Blog - Practical 365 - https://practical365.com
Blog Post - Link
Download - Link

Info
Script that generates a csv file with all Office 365 Admin Roles and their members.

=================================================================

Export a Licence reconciliation report from Office 365 using Powershell
Author - Alan Byrne
Download - Link
Blog - Link
Update Author - Sikkepitje
Updated Link - Link

Info -
As more and more companies move to Microsoft Office 365, IT Managers need to find a way to reconcile their cloud based licences with their actual user numbers.  No-one wants to pay for licences that they aren’t using!

If you log in to the Microsoft Office 365 portal, you can see how many licences you’ve purchased and how many are in use.  Unfortunately, there is no way to easily tell which licence has been assigned to which user account.

=================================================================

Office 365 License Reporting and Management Tool - Assign & Remove Licenses in Bulk
Author - Perumal - (JiJi Technologies)
Download - Link
Website - Link

Info -
A simple GUI based utility to manage Office 365 licenses.

Main features:
Manage Office 365 license options for multiple tenants from one place
Perform license management operation either on a single user or set of selected multiple users or on selected groups
Select multiple users for license management operation using CSV file
Export the user license reports to HTML/CSV/PDF/Excel

=================================================================

Assign Office 365 Licenses automatically based on AD Attribute
Author - Johnan Dahlbom
Download - Link
Website - Link

Info -
This script assigns Office 365 licenses automatically based on a local AD attribute of your choice fully automated and minimal input.

=================================================================

Office 365 licenses and services details per user report in CSV format 
Author - M Tarquinio
Download - Link

Info -
This script will create a comma separated file with a line per user and the following columns:
Display Name, Domain, UPN, Is Licensed?, all the SKUs in tenant, all the services, Errors, ImmutableId and BlockCredential.

=================================================================

Generate Exchange Environment Reports using Powershell
Author - Steve Goodman
Download - Link
Website - Link

Info -
This script generates a HTML report and can be scheduled and emailed. Compatible with Exchange 2003 - 2016

=================================================================

Export all distribution Group and All members using PS Script-Exchange 2007&2010
Author - Satheshwaran Manoharan
Download - Link
Website - Link

Info -
Export all the Distribution group and all the members of it to a CSV file. or Display all the Distribution group with its members in Exchange Mangement Shell Supports DYNAMIC Distribution group as well. Script Supports - Exchange 2007,2010,2013 & Office365

=================================================================

Export Office 365 User Last Logon Date to CSV File - 
Author - Alan Byrne
Download - Link
Website - Link

Info -
This script will connect to Office 365 and export a list of all your Office 365 Mailbox enabled users Last Logon Date/Time to a CSV file. It's useful for finding out if you're paying for any licences that aren't being used!

=================================================================

Mailbox Size Report for Exchange 2010/2013/2016 & Office 365
Author - Satheshwaran Manoharan
Download - Link
Website - Link

Info -
Script to export all the Mailbox Size and Item Count and Last logon time  

=================================================================

Office 365 Tenant Details
Author - Tim Springston
Download - Link
Website - Link

Info -
This script is used to quickly retrieve all of the basic details about your Office 365 tenant and put them at your fingertips.

=================================================================

Office 365 Licensing Report
Author - Michael Hall
Download - Link

Info -
Report on all assigned licenses within a tenant by checking each user with the AccountSKU as well as the Service Name.

=================================================================

Script to document your Exchange Online Configuration
Author - Terry Munro
Download - Link
Support Article - Link
Website - Link

Info -
The script generates a separate report for many of the configurations of Exchange Online, including
- Accepted Domains
- Azure AD Connect - Directory Sync status
- Free/Busy configuration
- Inbound Connectors
- Outbound Connectors
- Mailbox count
- Mailbox details
- Mailboxes with Forwarders
- Mailboxes with Full Access Delegates
- Mailboxes with Send As Delegates
- Mailboxes with Send on Behalf Delegates
- Users configured with MFA - Multi-Factor Authentication
- Mobile device policies
- OWA Mailbox policies
- Tenant Administrators
- Transport Rules

=================================================================

Exchange Organization documentation script for auditing and creating As Built docos
Author - Terry Munro
Download - Link
Support Article - Link
Website - Link

Info -
This script generates a separate report for each of the following for all the local Exchange servers in your Organization
- Exchange SSL certificates
- Internal DNS records of your external domain (split DNS or pinpoint DNS records)
- OWA Virtual Directory URL
- ActiveSync Virtual Directory URL
- Outlook Anywhere configuration
- AutoDiscover Virtual Directory URL
- OAB Virtual Directory URL
- Web Services Virtual Directory URL
- Accepted Domains
- Email Address Policy configuration
- Receive Connectors configuration
- Send Connectors configuration
- Transport configuration
- Mailbox Database configuration
- Exchange Server configuration, including Exchange version
- OWA Mailbox Policies
- Mobile Device Policies
- Transport Rules
- Exchange Administrators
- Mailbox Details
- Mailboxes with Forwarders
- Mailboxes with Full Access Delegates
- Mailboxes with Send As Delegates
- Mailboxes with Send on Behalf Delegates
- Mailbox statistics

=================================================================

Group Membership Pack for Office 365, Local AD and Exchange 
Author - Terry Munro
Download - Link
Support Articles - Part 1 - Part 2
Website - Link

Info -
This pack of ten PowerShell scripts will generate csv reports of ALL groups and their members in local AD and local Exchange, Azure AD, and Exchange Online, including dynamic distribution groups and Office 365 Groups (Unified Groups) and their members.

=================================================================

Mailbox Permission Pack for Exchange Online and Exchange On-Premises
Author - Terry Munro
Download - Link
Support Article - Link
Website - Link

Info -
Ten scripts that will report on Send As, Send on Behalf and Full Access in both Exchange Online and Exchange Local. Includes reports on which mailboxes a particular user has access to and report on all mailboxes that are configured with permissions and who has that access.

The Mailbox Permission Pack scripts perform three main functions in either Exchange Online or Exchange On-premises.

Single mailbox - Who has access to this mailbox
Generate reports on a single mailbox -
- Reports which users have Full Access, Send-As, Send on Behalf and Delegated Folder permissions to the mailbox you specify (Default Folders)

Single Mailbox - Which mailboxes does this user or group have access to
Generate reports on a single mailbox -
- Report which mailboxes a particular user or email enabled security group have access to

Global Reports on all mailboxes
- Report globally on all mailboxes that are configured with permissions and who has that access.

=================================================================

List all Office 365 MFA Enabled Users
Author - Guy Bachar
Download - Link
Website - Link

Info -
The following script lists all Office 365 MFA Enabled Users together with the following properties:
- DisplayName
- UserPrincipalName
- IsLicensed
- MFAState
- RememberDevicesNotIssuedBefore
- StrongAuthenticationUserDetailsPhoneNumber
- StrongAuthenticationUserDetailsEmail
- DefaultStrongAuthenticationMethodType

=================================================================

Office 365 Groups Report (Unified Groups)
Author - Paul Cunningham
Download - Link
Website - Link

Info -
Get-O365GroupReport.ps1 is a PowerShell script that generates an email report about new, modified, and deleted Office 365 Groups (also known as Unified Groups).

The script will store information about the Office 365 Groups in your tenant in a file named UnifiedGroups.xml, located in the same folder as the script. The first time you run the script, all Groups will be reported as "New". On subsequent runs, the script will use the previous results to determine which Groups are new, modified, or deleted since the last time the script was run.

=================================================================

Extract a list of Inactive Mobiles from Office 365
Author - Dan Rose
Download - Link
Website - Link

Info -
This script will connect to your Office 365 environment and export all those mobiles that have not synchronised in the last 14 days.

=================================================================

Create OneDrive for Business usage report for all users
Author - Arleta Wanat
Download - Link

Info -
The script retrieves all SPO users and pulls usage statistics for their ODB sites.
The script uses CSOM. It requires SharePoint Online SDK and SharePoint Online Management Shell. Make sure the script refers the paths on your computer:

=================================================================

Retrieve Inbox Rules in Office 365 Exchange Online
Author - OneScript Team
Download - Link

Info -
Get inbox rules in Office 365 Exchange Online. You can get inbox rules for multiple rules with this script.

=================================================================

Exchange Meeting Room Statistics
Author - Nuno Mota
Download - Link
Website - Link

Info -
This script will gather statistics such as the number of meetings during the specified times, the total and average meeting duration (in minutes), the total and average number of attendees, how many meetings started in the morning and afternoon, how many recurring meetings, and the 5 five organizers and attendees. It will export all the stats to a CSV file and also print in on the screen.

=================================================================

Office 365 Exchange Auditing and Reporting - Mailbox Usage, Traffic Reports, etc
Author - Robert Luck
Download - Link
Website - Link

Info -
GUI utility to get 160+ Exchange Online statistics & auditing reports along with visually appealing dashboards. This tool gives you the insights and statistics about the Mailbox Size, Mailbox Usage, Active & Inactive Mailboxes, Incoming and Outgoing Mail Traffic, Spam Emails, Malware Emails, Mailbox Permission, Send As Permission, Send on Behalf permission, Mailbox Forwarding with Internal and External Classification, Mailbox Protocols Configurations, Enabled or Inactive ActiveSync Devices, Mailboxes on Hold, Email Signatures, OOF (Out of Office) configuration, Dynamic Distribution Groups, Role Groups, Inbox Rules/Filters, Non-Owner Mailbox Access, Mailbox Logins, Active Sync Device Changes, Internal/External Forwarding, Mailbox Rule Changes and more.

=================================================================

Get User Hold Policies
Author - Aaron Guilmette
Download - Link
Website - Link

Info -
If you've ever wanted to be able to track down all of the policies and ways that a mailbox's data might be held, this might be the tool for you.  This script combines data from the Security & Compliance Center's retention and label policies, in-place holds, Exchange Online litigation hold, as well as legacy Exchange Online MRM policies.

=================================================================

Audit - Mailbox Rules to External Recipients
Author - Aaron Guilmette
Download - Link
Website - Link

Info -
As part of your security protocol, you may wish to audit user mailboxes for rules that deliver messages to external recipients.  You can use this script to collect that data.

This script checks user mailboxes for rules that match the following:
- ForwardAsAttachmentTo is an external recipient
- ForwardTo is an external recipient
- RedirectTo is an external recipient

=================================================================

Export and Import Unified Groups Settings - Tenant to Tenant Migration
Author - Aaron Guilmette
Download - Link
Website - Link

Info -
Use this script to export / import Unified Groups and their settings as part of a tenant-to-tenant migration.This script supports multiple modes of operation:- Export (Backup)- Import (1 stage or 2 stage)- SetAs well as a method of transformation (address rewrite for importing/exporting).

=================================================================

Get Mailbox Statistics for All Mailboxes
Author - Aaron Guilmette
Download - Link
Website - Link

Info -
This easily-modifiable example script will allow you to gather statistics and output the details that your boss wants.

=================================================================

Forwarding Address Export and Import
Author - Aaron Guilmette
Download - Link
Website - Link

Info -
When transitioning to Office 365 (or any other sort of cross-forest move), Forwarding Address information does not get preserved.  This script will allow you to back up both types of forwards (ForwardingAddress, which is a mail-enabled Exchange object and ForwardingSmtpAddress, which is a standard SMTP address), and then later restore or import them to target objects as standard SMTP forwards.

=================================================================

Migrate EOP Settings Between Tenants
Author - Aaron Guilmette
Download - Link
Website - Link

Info -
Based on the TN instructions for moving EOP between organizations, this script aims to help break it into various modes and functions (import and export all settings, DNS, domain confirmation), simplify the process, as well as give an operational order.  This script supports both the legacy standalone EOP as well as the Office 365 Exchange Online Protection SKU, as well as configuring IRM for Azure AD/ExchangeOnline.

=================================================================

Audit - Transport Rules to External Recipients
Author - Aaron Guilmette
Download - Link
Website - Link

Info -
Your organization's security protocol may require you to peridiocally audit your environment to ensure data exfiltration via transport rules is not configured.  This script will report on transport rules with the following actions configured to send to external recipients:
- AddToRecipients
- AddCcRecipients
- AddBccRecipients
- RedirectMessageTo

=================================================================

Report on Azure AD Stale Users (last login)
Author - Aaron Guilmette
Download - Link
Website - Link
Blog Article - Link

Info -
If you are utilizing external, guest, or B2B users in your Office 365 or Azure environments, you may need a way to determine which objects haven't been logged in or used in a while.  Azure AD doesn't provide an easy way to view this information (really only having the refresh token time avaiable).  This script uses the RefreshTokensValidFromDateTime property from the user in conjunction with one of the following:
- default token refresh lifetime in Azure AD (90 days)
- the actual token refresh lifetime if a policy has been configured and is able to be read
- a user-specified value

=================================================================

Office 365 Data Retriever Tool - 
Author - Veronica lengelle
Download - Link
Website - Link
Blog Article - Link

Info -
The tool will extract some data from Office 365 for users, Exchange, SharePoint and Team. This data can be exported to csv.
At this point in time, the tool will likely not be suitable for large tenants.

=================================================================