Useful PowerShell Scripts for Office 365 Migration

I recently took my company of about 140 off of our current POP/SMTP email system (yes, companies still use POP for email) and onto Microsoft’s Office 365 Hosted Exchange. They give you PowerShell access to your Exchange 2013 server so there is a lot you can do to help reduce the time it takes to get your environment ready. Here are some quick and easy PowerShell scripts I wrote to assist with my transition.

I added all of my users by importing a CSV file through the GUI, so all of these scripts I created after my users were already added.

The first one is to connect to your Exchange server. Run this in your PowerShell ISE once, and you’ll have access to all of the new modules for managing your Exchange server.

 

The next one I wrote was because I had two sets of O365 licenses (E3 licenses from our Microsoft Partnership, and E1 licenses that I purchased for the remaining users). I only wanted my users to have access to Exchange and Lync, so this script removed the other licensed features. The first part of the script removes the additional features, and the second part assigns the new license back to my users.

e1imports.csv

 

This next one I used for creating my external contacts. If you want to have email addresses in your distribution lists that are not members of your domain, you have to add them in as contacts. I then wanted to hide these contacts from showing up in the global address list, so the bottom script does that.

contact.csv

 

The next one I used was for adding members into my distribution lists. I used the GUI to make all of my distribution lists, but I then used this script to populate the members. The example below is adding members to the development@contoso.com distribution list.

distribution.csv

 

This next one I wrote because I wanted to have my conference rooms appear in a Room list, so I could separate them by which office they were located in. I used the GUI to create my conference rooms, but here is how I created the room lists, and added the conference rooms for each office.

 

This last one I used was to send all of my users their temporary passwords and a how-to guide for changing their temporary password and adding their new account to Outlook. I copied their email addresses and passwords straight from the GUI after I created the user accounts and pasted them into a CSV file.

emailpassword.csv

 

 

And that’s all! If you have any questions on how these work feel free to leave a comment.

 

Cheers!

 

 

 

3 thoughts on “Useful PowerShell Scripts for Office 365 Migration

  1. SergiooN

    404john.com is really interesting, but why it is on 18th place in google’s search results. It deserves to be in top 5. Many webmasters think that seo is dead in 2016, but it is not true. There is sneaky method to reach google’s top 5 that not many people know. Just search for: pandatsor’s tools

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>