Scripts - Hybrid Local Exchange and Office 365 Administration

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.


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

 Hybrid Local Exchange - Office 365 Administration

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

Hybrid Office 365 Administration Pack - Including scripts and csv files
Author - Terry Munro
Download - Link
Support Article - Link
Website - Link

Info
This pack includes scripts and csv files to automate the creation of Local user, resource and shared mailboxes - Automate creation of Office 365 user, resource and shared mailboxes - Migrate mailboxes - Set Full Access, Send As and Send on Behalf permission.

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

Microsoft Office 365: Add Exchange Online routing SMTP address
Author - I Lantz
Download - Link
Website - Link

Info -
This script will find mailboxes that are configured with EmailAddressPolicyEnabled:$false and have no "@tenant.mail.onmicrosoft.com" address and will add the SMTP routing address required for an Exchange Online Hybrid deployment.It will try to add the proxy address prefix@tenant.

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

Fix-ProxyAddress.ps1 - Missing .onmicrosoft proxy address
Author - Chris Goosen
Download - Link
Website - Link
Article - Link

Info -
A small script with a GUI that simplifies the process of adding an SMTP proxy address to mailboxes that are not being updated by Exchange email address policies.

Once launched, the script will prompt for your tenant routing domain in the format 'company.mail.onmicrosoft.com' and will search for all mailboxes in the organization that do not have an email address policy applied.

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

Script to Create Cloud Contacts for Dynamic Groups in Exchange Hybrid
Author - Joseph Palarchio
Download - Link
Website - Link

Info -
When configured in an Exchange Hybrid configuration, Dynamic Distribution Groups are not synchronized by DirSync.  For cloud users to see these objects in their GAL, a contact object must be created in the cloud with the SMTP address of the on-premises Dynamic Distribution Group.
This script creates the necessary contact objects in the cloud and restricts them to authenticated users.

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

Identify Email Addresses Non-Compliant with Their Policy
Author - Joseph Palarchio
Download - Link
Website - Link

Info -
This script helps identify users that have primary SMTP addresses that are not compliant with the email address policy that is assigned to them.

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

Active Directory AD Password Expire Office 365 Email Notification
Author - Fernando Perez
Download - Link
Website - Link

Info
Send a email to a AD User warning that the password will expire in X days. The email is sent to a Office 365 mailbox. Configure the server SMTP settings and ExpireInDays variables to determine when to send emails to user.

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

Find Objects with Duplicate UPN or SMTP values in Active Directory
Author - Aaron Guilmette
Download - Link
Blog Article - Link
Website - Link

Info -
Using the duplicate value referenced from the AADSync or DirSync Connector (or from running csexport), run this script to locate the errant objects.  Depending on your search parameters, this will query the default AD attributes, Exchange attributes, or SIP attributes that can cause sync to report a conflict.

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

Migration Prep - Merge User and Contact Object
Author - Aaron Guilmette
Download - Link
Website - Link

Info -
If you've been faced with duplicate objects identified by IDFix, then this may be the tool for you.  Frequently, customers are faced with mutliple objects that have the same attributes, causing errors during synchronization to Azure Active directory.  In the event that one of those objects is a contact and one of them is a user, you can use this tool to merge the contact object into the user and carry along all of the group membership and proxy addresses.

This script requires the Quest ActiveRoles PowerShell, in addition to access to an on-premises Exchange server and Active Directory domain controllers

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

Migration Prep - Collect Mailbox/User Reports before Migration - 
Author - Noble K Varghese
Download - Link

Info -
The script will generate a report on all mailboxes on local Exchange.

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

How to manage distribution groups synced from on-premise AD in cloud side
Author - OneScript Team
Download - Link

Info -
This script is used to help user managing DG in cloud side.
After Hybrid is set up, the user mailbox, who was moved to cloud side, can't manage the DG created in On-Premise Exchange. This script will create a DG with prefix "EXO".  All option can be changed with this DG, and this script can reflect the configuration changes back to on premise DG.

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

Recreate mailbox(es) on local Exchange
Author - Mark Gossa
Download - Link
Website - Link

Info -
The below script can be used to recreate a mailbox and user account in Exchange and AD. It exports all permissions and settings, exports the email then recreates the AD user and imports the settings again.

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

Fix Duplicate User Principal Name for On-premises Active Directory Users (Pre-Migration)
Author - OneScript Team (Microsoft)
Download - Link

Info -
This script enables you to export Active Directory users that have duplicate or empty user principal names. After correcting the email addresses for these groups, you can use this script to import them to the AD.

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

Migration Prep - Copy Mail Address to UPN
Author - Aaron Guilmette
Download - Link

Info -
This script will copy the email address field of users into the UPN field.
Supports -SearchBase and -SearchScope parameters, so you can now limit your queries.  Also sports a shiny new -OnlyMailboxes parameter, so you don't end up updating UPNs for mail-enabled users accidentally.

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