Exchange and other MTAs use DSNs (Delivery Status Notifications) and NDRs (Non-Delivery Reports) to notify the sender or sending MTAs (Message Transfer Agents aka Mail Servers) about the various statuses of a given email message. In Exchange, those messages are generated primarily by the categorizer component of the transport service.
You can use the New-SystemMessage cmdlet to create new messages. These messages can even be localized and can contain Html tags for properly styled notifications.
From a system perspective, the various notifications used are named and fulfill a specific purpose.
Delivery Status Notification (DSN) A report describing the result of an attempt to deliver a message
Message Disposition Notification (MDN) A report describing the status of a message after it has been successfully delivered to a recipient. Examples: read notification (RN) or non-read notification (NRN) Defined by RFC 2298 and controlled by Disposition-Notification-To header
Non-Delivery Report (NDR) A report indicating to the message sender that the message could not be delivered to the intended recipients
Non-Read Notification (NRN) A report indicating that a message was deleted before it was read when a read receipt was requested
Out Of Office/Facility (OOF) A report indicating that the recipient will not respond to a new message OOF refers to the Microsoft original term „out of facility“
Read Notification (RN) A report indicating that a message was read
Recall Report (RR) A report indicating the status of a recall request for a specific recipient A recall request is used when a sender tries to recall a sent message by using Outlook
This post has first been published in my personal blog here.
This script will generate a report for Exchange 2007/2010 Public Folder Replication. It returns general information, such as the total number of public folders, total items in all public folders, the total size of all items, the top 20 largest folders, and more. Additionally, it lists each Public Folder and the replication status on each server.
By default, this script will scan the entire Exchange environment in the current domain and all public folders. This can be limited by using the -ComputerName and -FolderPath parameters.
Generate a public folder generation report for public folder \MYPUBLICFOLDER having replicas on servers MXSRV01, MXSRV02, MXSRV03
Get-PublicFolderReplicationReport.ps1 -ComputerName MXSRV01,MXSRV02,MXSRV03 -FolderPath "\MYPUBLICFOLDER" -Recurse -Subject "Public Folder Environment Report" -AsHTML -To postmaster@varunagroup.de -From postmaster@varunagroup.de -SmtpServer relay.mcsmemail.de -SendEmail
Example report
If you want to simplify the report generation, create an additional script: Run-PublicFolderReplicationReport.ps1
param( [string]$publicFolderPath = '' ) # Variables # Custom label for email subject $label = 'Exchange 2007' $recipients = 'pfreports@mcsmemail.de' $sender = 'postmaster@mcsmemail.de' # array of public folder servers to query $publicFolderServers = @('EX2007-01','EX2010-01') # SMTP server to relay mail $smtpServer = 'relay.mcsmemail.de' # Used to trigger a dedicated report for \GrFolder1\Folder1, \GrFolder1\Folder2 $granularRootFolder = @() # @("\Folder01") $subPath = '' # Check for granular folders, Added 2016-01-19 if($granularRootFolder -contains $publicFolderPath) { $subPath = $publicFolderPath $publicFolderPath = '' } # if($publicFolderPath -ne '') { Write-Host "Generating Public Folder reports for $($publicFolderPath)" # Generate report for a single public folder | Change COMPUTERNAME attribute for servers to analyse .\Get-PublicFolderReplicationReport.ps1 -ComputerName $publicFolderServers -FolderPath $publicFolderPath -Recurse -Subject "Public Folder Environment Report [$($publicFolderPath)] [$($label)]" -AsHTML -To $recipients -From $sender -SmtpServer $smtpServer -SendEmail } else { if($subPath -ne '') { $publicFolderPath = $subPath } else { $publicFolderPath = '\' } if($granularRootFolder.Count -ne 0) { Write-Host 'Following root folders will be excluded when using "\":' $($granularRootFolder) } Write-Host "Generating Public Folder reports for all folders in $($publicFolderPath)" $folders = Get-PublicFolder $publicFolderPath -GetChildren # Generate a single report for each folder in root $folderCount = ($folders | Measure-Object).Count $pfCount = 1 foreach($pf in $folders) { # Check, if folder is in list of granular folders if($granularRootFolder -notcontains $pf) { if($pf.ParentPath -eq '\') { $name = "$($pf.ParentPath)$($pf.Name)" } else { $name = "$($pf.ParentPath)\$($pf.Name)" } $activity = 'Generating Stats' $status = "Fetching $($name)" Write-Progress -Activity $activity -Status $status -PercentComplete (($pfCount/$folderCount)*100) .\Get-PublicFolderReplicationReport.ps1 -ComputerName $publicFolderServers -FolderPath $name -Recurse -Subject "Public Folder Environment Report [$($name)] [$($label)]" -AsHTML -To $recipients -From $sender -SmtpServer $smtpServer -SendEmail $pfCount++ } } }
Use the $granularRootFolder array to add root public folders which require a dedicated report for each sub-folder.
Additional credits go to Mike Walker (blog.mikewalker.me)
This Powershell script has been optimized using the ISESteroids™ add-on. Learn more about ISESteroids™ here.
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.
The report shows the following:
The script uses a separate CSS file for styling the HTML output.
# Example 1 # Generate an HTML report and send the result as HTML email with attachment # to the specified recipient using a dedicated smart host .\Get-ExchangeEnvironmentReport.ps1 -HTMReport ExchangeEnvironment.html -SendMail ` -ViewEntireForet $true -MailFrom roaster@mcsmemail.de -MailTo grillmaster@mcsmemail.de -MailServer relay.mcsmemail.de
Additional credits go to Steve Goodman for the original Exchange Environment Report V1.x scripts.
The PowerShell script to purge IIS and Exchange Server 2013 has been updated to support email reporting.
When executed by a scheduled task it is extremely helpful to Exchange Administrators to receive some sort of conformation of the script execution.
If using the SendMail switch, a summary report is sent as an Html email
Parameters added:
.PARAMETER SendMail Switch to send an Html report .PARAMETER MailFrom Email address of report sender .PARAMETER MailTo Email address of report recipient .PARAMETER MailServer SMTP Server for email report
This post has first been posted on my legacy blog.
This script reads Exchange Organization data and creates a single Microsoft Word document. A later version will support exporting to an Html file.
The script requires an Exchange Management Shell for Exchange Server 2016 or newer. Older EMS versions are not tested.
A locally installed version of Word is required, as plain Html export is not available, yet.
The default file name is 'Exchange-Org-Report [TIMESTAMP].docx'.
Most of the script requires only Exchange admin read-only access for the Exchange organization. Querying address list information requires a membership in the RBAC role "Address Lists".
The script queries hardware information from the Exchange server systems and requires local administrator access to the computer systems.
# Example 1 # Create a Word report for the local Exchange Organization using # the default values defined on the parameters section of the PowerShell script. .\Get-ExchangeOrganizationReport.ps1 -ViewEntireForest:$true # Example 2 # Create a Microsoft Word report for the local Exchange Organization with # a verbose output to the current PowerShell session. .\Get-ExchangeOrganizationReport.ps1 -Verbose
The script is based on the ADDS_Inventory.ps1 PowerScript by Carl Webster: https://github.com/CarlWebster/ActiveDirectory
This script fetches the disk volume (Win32_Volume) information via WMI and shows the results in the PowerShell command line window. Optionally, you can have the report sent as an Html email to a recipient of your choice.
The switch -AllExchangeServer simplifies gathering the disk volume information across all Exchange servers in your environment.
The following screenshot shows the command line output when using
.\Get-Diskpace.ps1 -ComputerName MYSERVER
The following screenshot shows an example of the html email output when using
.\Get-Diskpace.ps1 -ComputerName MYSERVER -SendMail -MailFrom postmaster@sedna-inc.com -MailTo exchangeadmin@sedna-inc.com -MailServer mail.sedna-inc.com
# EXAMPLE 1 # Get disk information from computer MYSERVER in MB Get-Diskpace.ps1 -ComputerName MYSERVER -Unit MB # EXAMPLE 2 # Get disk information from all Exchange servers and send html email Get-Diskpace.ps1 -AllExchangeServer -SendMail -MailFrom postmaster@sedna-inc.com -MailTo exchangeadmin@sedna-inc.com -MailServer mail.sedna-inc.com
The community script to gather legacy public folder replication reports for Exchange Server 2010 and Exchange Server 2007 has been updated.
The replica status of a public folder is indicated by a green or red backgroud color for each folder and replica. The previous version of the script used the replica percentage to set the backgroud color. Escpecially folders holding a large number of items had an issue when Math::Round provided a 100% value.
The current version of the script compares the item count itself. This approach provides a more accurate result.
Enjoy.