Get all Exchange user inclusive details from a list of AD groups

Abstract: You sometimes might need a list of Exchange users which are part from one (or more) AD groups with some additional amount of data from the users Exchange mailboxes.This can be performed via a small powershell script.

The script below will (if not adjusted) collect the users who on your exchange servers started with the name EXMAIL as an *.cvs file with additional information like UserAlias, UserDisplayName, UserItemCount, UserTotalItemSize (in MB), UserLastLogonTime, Database, ServerName, OrganizationalUnit, ActiveSyncStatus, PrimarySmtpAddress. You can import that to Excel (use "|" as separator) and some filter options there if needed.

CLSWrite-Host "Please wait ... working ..."

# Keep noted that the script is written for an Exchange cluster with two nodes called exmail01 and exmail02. If your is different adjust the -like "EXMAIL*" part