Powershell is one of the efficient ways for managing Exchange servers. Most of the tasks can be done effectively using the powershell. In this article, I’m going to share some of the powershell scripts which are readily available in the Exchange scripts folder.

  • CheckDatabaseRedundancy.ps1 – To monitor the redundancy of replicated mailbox databases, and to alert you when only a single healthy copy of a replicated database exists. In this case, both active and passive copies are counted when determining redundancy.

  • CollectOverMetrics.ps1 – This reads DAG member event logs to gather information about database operations (such as database mounts, moves, and failovers) over a specific time period. This will be helpful to start the investigation for any database failovers.

  • CollectReplicationMetrics.ps1 – collects data from performance counters related to database replication. The script gathers counter data from multiple Mailbox servers, writes each server’s data to a .csv file, and then reports various statistics across all of this data (for example, the amount of time each copy was failed or suspended, the average copy or replay queue length, or the amount of time that copies were outside of their failover criteria).

  • ConfigureAdam.ps1 – To modify the default Active Directory Lightweight Directory Services (AD LDS) configuration on Edge Transport servers before you subscribe the Edge Transport server to your Exchange organization
  • Convert-DistributionGroupToUnifiedGroup.ps1 – This script does the actual work of converting all eligible distributions lists in your Active Directory to Office 365 Groups in your Office 365 tenant.
  • MailboxDatabaseReseedUsingSpares.ps1 – Reseeds a failed and suspended database copy after performing a series of safety checks for the environment. This script is used to validate the safety of the environment, before proceeding to swap the failed database copy to a spare disk and reseed.
  • RedistributeActiveDatabases.ps1 – Moves databases between their copies to attempt to have an equal number of mounted databases on each server in a database availability group. If required, it will also try to balance active DBs across sites. This can be run to check the existing distribution by using ShowDatabaseDistributionByServer parameter

  • ResetCasService.ps1 – This script will reset and recreate the virtual directory for the service that you define.
  • Troubleshoot-CI.ps1 – Performs troubleshooting on Content Index (CI) catalogs. Troubleshoot-CI.ps1 script detects problems with content index catalogs and optionally attempts resolutions to the problems.
  • Troubleshoot-DatabaseLatency.ps1 – Script is used by Microsoft System Center Operations Manager 2007 to detect and correct high latencies on a database. You can create a scheduled task by using Task Scheduler to run this script. Database latencies can be caused by a number of issues.
  • Troubleshoot-DatabaseSpace.ps1 – Used by Microsoft System Center Operations Manager 2007 to detect and correct any excess log growth or Microsoft Exchange database (.edb) file growth that, if unchecked, may cause database downtime. By default, System Center Operations Manager 2007 runs the script every 15 minutes

Happy learning!! 🙂

By Ashok M

Microsoft Certified Professional, Blogger, Author at Cloudexchangers.com, Real world technical contribution via Microsoft Communities (Social Technet/QnA). Extensive knowledge and experience in Messaging (Microsoft Exchange 2003 - 2019) and services including Infrastructure (Windows Server, Active Directory, ADFS, ADCS, File Servers, SCCM), Cloud (Microsoft Azure, Microsoft 365, EMS), Unified Communication (Skype for Business, Video conferencing room systems, Surface Hub), Virtualization (Hyper V), Database (SQL). Have experience in design, implementation, migration & support for various Microsoft infrastructure products across various industry verticals.

Leave a Reply

Your email address will not be published.