TechShizz | All posts tagged 'Office 365'

Get Office 365 Report - Mailbox Size, Last Logon Time, Licence, Archive

This powershell script provides information about Exchange Online mailboxes. It includes following attributes: FirstName, LastName, DisplayName, Alias, UserPrincipalName, Office, Department, TotalItemSize, LastLogonTime, RecipientTypeDetails and basic licensing information.

Script combines Get-MsolUser, Get-Mailbox and Get-MailboxStatistics cmdlets into single one. You must have appropriate permissions in your tenant to run these cmdlets.

Discovery Mailboxes are excluded from report. TotalItemSize values are converted to MB.

Windows Azure Active Directory Module for Windows PowerShell is required. Otherwise Get-MsolUser and whole script will fail.

Download O365Report.ps1, open PowerShell, navigate to folder where script was downloaded, run the script. You will get credentials popup to connect to your tenant (make sure that you use the same account to access Office 365 Admin Portal and Exchange Online). Results will be exported to CSV file.

Download

Office 365 Mail Traffic Statistics by User

This script connects to Office 365 and retrieves the inbound and outbound mail traffic statistics by recipient for all available dates. This information is then exported to a CSV file which can be opened in Microsoft Excel.


Download

This script connects to Office 365 and retrieves the inbound and outbound mail traffic statistics by recipient for all available dates.  Microsoft do not consistenty store message tracking information and you may only see results for the last few days.  

It collects this information using the Get-MessageTrace cmdlet, which parses the SMTP Message Tracking logs within Office 365.  This information is then combined within the script to create a meaningful output.

More information about this script and how it works can be found on the Cogmotive Office 365 reporting blog.

To use the script:

Open PowerShell and run the script as shown below.  Obviously you need to replace the username and password with your own values.

.\Get-DetailedMessageStats.ps1 -Office365Username admin@xxxxxx.onmicrosoft.com -Office365Password Password123 

Below you can see an example of the output, which is saved in CSV format.  This output file can be opened in Microsoft Excel and manipulated for your own needs.

 

Export Office 365 User Last Logon Date to CSV File

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!

Download

his 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!

The last logon date relates to the time a user last accessed their mailbox using either Outlook, Web Mail or their mobile phone.

You can choose to either list all users in your Office 365 tenant or use the -InputFile switch to pass a text file with the UserPrincipalName's of a subset of users for which you want the data.

To run the script from a Powershell window:

 

PowerShell
.\Get-LastLogonStats.ps1 -Office365Username admin@xxxxxx.onmicrosoft.com -Office365Password Password123 -InputFile c:\Files\InputFile.txt 
 

NOTE: If you do not pass an input file to the script, it will return the last logon time of ALL mailboxes in the tenant.

Export all Office 365 users Clutter status to a CSV file

Download the following PowerShell script - Download

This script connects to Office 365 and lists out all mailboxes and shows you if each user has Clutter enabled or disabled for their mailbox.

You can either pass a Username and Password to the script, allowing it to be run as a scheduled task or it can be run standalone. 

Office 365: Add a new SMTP address for all users for a new domain

Download this PowerShell script -Download

This will perform a test pass for adding the new alias@office365bootcamp.com as a secondary email address to all mailboxes. Use the log file to evaluate the outcome before you re-run with the -Commit switch.

PowerShell
.\Add-SMTPAddresses.ps1 -Domain office365bootcamp.com
This will perform a test pass for adding the new alias@office365bootcamp.com as a primary email address to all mailboxes. Use the log file to evaluate the outcome before you re-run with the -Commit switch.
PowerShell
.\Add-SMTPAddresses.ps1 -Domain office365bootcamp.com -MakePrimary
 This will add the new alias@office365bootcamp.com as a primary email address to all mailboxes.
PowerShell
.\Add-SMTPAddresses.ps1 -Domain office365bootcamp.com -MakePrimary -Commit

Source : https://gallery.technet.microsoft.com/office/Bulk-Add-SMTP-Addresses-to-e3d28842