Showing posts with label mailboxes. Show all posts
Showing posts with label mailboxes. Show all posts

Thursday, October 10, 2013

Powershell Script - Remote Drivespace (Mountpoints) Emailed Report

10/09/2013: Today's post will outline a remote drivespace reporting script that I routinely use to monitor and report on the available Transaction Log space on my Exchange servers. The script leverages WMI to remotely query for the current freespace & volume size metrics (on either specified drive letters, or all Volume Mount Points on the target system), calculates the space in terms of gigabytes and percentage-free, outputs a report file, and emails the results to an admin mailbox.

I'd generally design this type of script to leverage Exchange Management Shell and dynamically query all servers in the appropriate site in the mailbox role (to automatically accommodate server adds and removals over time). But in this case I wanted this script to be 'blind' to Exchange version differences and also avoid a dependency on Exchange Management Shell. A specific goal in this case was to provide a tool to enable junior admins to evaluate the drive status after backup failure alerts, without the need to run the queries from a machine with a specific version of the Exchange Management Tools installed. So I instead use semicolon-delmited string variables to statically store arrays of server names for processing within the script itself.

Wednesday, September 18, 2013

Powershell - The Big All-in-One All Exchange 2010 DAG Mailboxes in a Site Query

9/18/2013: Here's a one-line Exchange Management Shell Powershell command that will retrieve useful attributes on all Exchange 2010 DAG-hosted mailboxes in the specified site.

Describing the process used by the command:
  1. Retrieve all exchange servers, that are Mailbox Servers, in the designated AD Site,with Exchange version 14 (Exchange 2010)
  2. Then retrieve all databases on those servers, where the ReplicationType attribute is 'Remote' (e.g. DAG replicated)
  3. Then retrieve all mailboxes in those databases, 
  4. And return a list of specific attributes of the mailbox, including a custom field that encapulates a semi-colon-delimited joined string created from all EmailAddresses of the mailbox. 
  5. And finally, export that collection of data to a csv file.

Powershell - Test a file list of mailboxes for Outlook Latency

9/18/2013: Another quicky broad troubleshooting script. This one is aimed at quickly answering those, "Users are reporting slow Outlook Response. Is there an issue?", helpdesk escalations.

Run Test-MAPIConnectivity against a list of mailboxes and report access latency

Powershell - Test all mailboxes in a store

9/18/2013: This is another item I wrote a few years ago to tackle testing of Content Indexing and Exchange Search function, on an Exchange 2007 CCR cluster that was experiencing drive I/O issues, leading to sporadic problems with the update speed and function of the Content Indexing processes:

Powershell - Draw a random mailbox for testing

9/18/2013: Here's something I make use of for quick-evaluating mailbox server health, immediately after a switchover/failover or returning a system to online status after a maintenance outage: