The following PowerShell scripts have been published by our Exchange and Office 365 experts to the technical community at TechNet Gallery. Please use the GitHub repositories to report issues or to file feature requests.
- GlobalFunctions Module
A module to provide centralized logging capabilities. This script is a *must have* for other Exchange 2013/2016/2019 modules if mentioned in the notes section of the script.
- Test Office 365 Domain Availability
Using this script you can test the domain availability in Office 365 and Azure AD.
- Test thumbnailPhoto for Azure AD guest users
Using this script you can update the default guest user profile photo.
Exchange Server 2013 / 2016 / 2019
- Exchange Environment Report v2
This script creates an HTML report showing the following information about an Exchange 2019, 2016, 2013, 2010, and, to a lesser extent, 2007 and 2003 environment.
- Report for enabled client protocols
This script gathers a list of enabled users for a selected Exchange Server client protocol.
- Export delegate and SMTP forwarding information for Exchange (Online) mailboxes
PowerShell script to export mailbox delegates, SMTP forwarding inbox rules, and mailbox SMTP forwarding information or compliance auditing.
- Manage Master Category List for Shared Mailboxes and Teams
C# solution to export/import/copy the master category list to other users/shared mailboxes or even Microsoft Teams calendar.
- Create a new Room Mailbox with Security Groups
A script to create a new room mailbox with associated full access and/or send-as security groups.
- Export all user mailbox permissions
This script exports all mailbox folder permissions for mailboxes of the type UserMailbox. This is useful for documentation purposes prior to migration.
- Remove Out-Of-Office rules from user mailbox
This script searches for OOF rules created by users using the Outlook rule-tab in the OOF assistant and deletes existing OOF rules.
- Add resized user photos automatically
This script supports resizing of user photos and storing the resized images in Active Directory, Exchange On-Premises, or Exchange Online.
- Parse email messages content for further processing
This script fetches emails from a given monitoring mailbox by searching email messages for a given subject string.
- Update OWA vDir config across multiple servers
This script checks multiple Exchange Server 2013 OWA web.config files for the existence of IMCertificateThumbprint and IMServerName XML nodes required for Skype for Business OWA integration.
- Remove Orphaned HealthMailbox and SystemMailbox Accounts from MESO Container
This script removes Active Directory objects for HealthMailboxes or SystemMailboxes in the Microsoft Exchange System Objects (MESO) container that do not have a homeMDB attribute set.
- Connect to Exchange Server 2013+ using remote PowerShell
This script connects to a dedicated or a randomly selected Exchange Server using remote Powershell.
- Create Exchange internal/external Url based certificate requests
This script helps to create certificate requests (CSR) based on hostnames used for internal and external URLs of Exchange Server virtual directories.
- Export Messages from Transport Queue
Script to suspend and export messages from a transport queue.
- Simple import of multiple PST files for a single user
A script to simplify the import of multiple PST files for a single user.
- Create a new Team Mailbox with Security Groups
A script to create a new shared mailbox with associated full access or send-as security groups.
- Find and remove corrupt HealthMailboxes
Script to find and remove or disable Exchange Server 2013 HealthMailboxes
- Change IIS Log File Settings
Script to configure IIS log file location and other log file settings, especially for Exchange Server 2013/2016
- Purge Exchange Server 2013/2016/2019 and IIS Log Files
Script to purge Exchange Server 2013/2016/2019 and IIS log file remotely from a managing or job server
- Send emails for Transport Agent and Transport Rule testing
A script for sending a defined number of emails of a certain type having a specific attachment for the testing of Transport Agents and Transport Rules
- Copy a receive connector from one Exchange 2013 Server to multiple Exchange Servers
Script to copy a configured Exchange Server 2013/2016/2019 receive connector from a source server to additional Exchange 2013/2016/2019 servers.
- Add remote IP-address ranges to an existing receive connector
Add remote IP address ranges to an Exchange Server 2013/2016/2019 receive connector.
- Copy anti-virus pattern to Exchange 2010/Exchange 2013 servers
Script to copy anti-virus pattern files from a given source location to multiple Exchange 2010/Exchange 2013 servers
- Gather Exchange Configuration Data
Script to gather Exchange Org configuration data and export the configuration as text/CSV files
- Create a scheduled task for Exchange Server 2013+
This script adds a new scheduled task for an Exchange Server 2013+ environment in a new task scheduler group „Exchange“.
- Fetch all remote SMTP servers from Exchange receive connector logs
This scripts fetches remote SMTP servers by searching the Exchange receive connector logs for the EHLO string.
- Blog: –
- Github: https://github.com/Apoc70/Get-RemoteSmtpServers
- Clear Private Flag on Mailbox Messages
C# Executable to clear an item’s private flag after migrating public folder content to a shared mailbox.
- Set Mailbox Item Private Flag
C# Executable to set an item’s private flag after migrating public folder content to a shared mailbox from a legacy mailbox system.
Exchange Server 2007/2010
- Fetch recently created public folders
This script gathers all public folders created during the last X days and exports the gathered data to a CSV file
- Remove orphaned users and groups from legacy public folder ACLs
Cleanup legacy public folder ACLs by removing orphaned other unproperly configured accounts
- Exchange 2010 Public Folder Replication Report (UTF8 support)
An updated version of the script originally posted by Mike Walker to support public folder with non-ASCII characters
- Add multiple legacy public folder replicas recursively
Script to get more control of adding legacy public folder replicas recursively
- Convert Word documents using PowerShell
This script converts Word compatible documents to a selected format utilizing the Word SaveAs function. Each file is converted by a single dedicated Word COM instance.
Please send comments, wishes, and ideas to email@example.com.
Need assistance with your Exchange Server Organization? You plan to upgrade your Exchange Server Organization? You plan to migrate to Office 365? Contact us: firstname.lastname@example.org
Update 2020-10-05: Fetch all remote SMTP servers from Exchange receive connector logs added
Update 2020-05-25: TechNet Gallery links removed due to end of TechNet Gallery in mid-2020
Update 2020-02-07: Report for enabled client protocols, Exchange Environment Report – v2, Set thumbnailPhoto for AzureAD guest users added
Update 2019-05-07: Export mailbox delegates and SMTP forwarding information added
Update 2018-09-04: Add remote IP-address ranges to a receive connector added
Update 2018-06-16: Manage Master Category List for Shared Mailboxes and Teams added
Update 2018-04-29: Convert Word documents using PowerShell and Set Mailbox Item Private Flag added
Update 2018-01-24: Create a new Room Mailbox with Security Groups added
Update 2017-11-11: Export all user mailbox permissions added
Update 2017-09-22: Remove Out-Of-Office rules from user mailbox added
Update 2017-05-20: Parse email messages content for further processing and Update OWA vDir config across multiple servers added
Update 2017-03-18: Fetch recently created public folders and Clear Private Flag on Mailbox Messages added
Update 2017-02-22: Remove Orphaned HealthMailbox and SystemMailbox Accounts from MESO Container added
Update 2017-02-17: Test Office 365 Domain Availability added
Update 2017-02-13: Connect to Exchange Server 2013+ using remote PowerShell added
Update 2017-02-07: Create Exchange internal/external Url based certificate requests, Create a scheduled task for Exchange Server 2013 added
Update 2017-01-24: Gather Exchange Configuration Data added
Update 2017-01-05: Export Messages from Transport Queue added
Update 2016-11-29: Clean legacy public folder ACL added, Scripts categorized
Update 2016-11-28: Add multiple legacy public folder replicas added
Update 2016-08-18: Simple import of multiple PST files for a single user added
Update 2016-07-28: Change IIS Log File settings Github Url added, Create a new Team Mailbox with Security Groups added
Update 2016-06-04: GlobalFunctions added
Update 2015-06-18: Copy-ReceiveConnector updated
Update 2015-06-01: Exchange 2010 Public Folder Replication Report (UTF8 support)
Update 2015-05-21: Copy anti-virus pattern to Exchange 2010/Exchange 2013 servers added
Update 2014-12-10: Copy a receive connector from one Exchange Server to multiple Exchange Servers added