Here is an useful PowerShell cmdlet to customise DSN messages for your Exchange organization.
Topics for PowerShell New-SystemMessage
- Example 1: New-SystemMessage HTML
- Research Parameters for New-SystemMessage with Get-Command
- Example 2: New-SystemMessage – Write Mailbox Quota Warning
- Example 3: -DsnCode 5.1.1
- More Exchange PowerShell Cmdlets
I cover PowerShell basics elsewhere and I am assuming that you have a working knowledge of the cmdlets and how to research parameters. Incidentally, I use PowerShell 2.0s graphical ISE, rather than the command line version.
The first of the required elements is the DSN code number, for example 5.1.2. See more about NDR codes.
Naturally, you need the -Text string to display in the message.
New-SystemMessage -DsnCode <EnhancedStatusCode> -Text <String>-Internal <$true | $false> -Language <CultureInfo>
Here below is an example featuring html code, actually, I prefer plain text.
New-SystemMessage -DsnCode 5.1.2 -Text ‘The user’s mailbox has been<B>disabled</B>. Please visit <A HREF="http://help.yourplace.com">Internal Support</A> or contact "InfoSec" for more information.’ -Internal $true -Language En
Note 1: The language is English (En) and the message is for internal users only ($true).
Get-Help New-SystemMessage -full
Note 2: You can also specify a Domain Controller, also Get-Help reveals the handy -WhatIf parameter.
Here is a free tool to monitor your Exchange Server. Download and install the utility, then inspect your mail queues, monitor the Exchange server’s memory, confirm there is enough disk space, and check the CPU utilization.
This is the real deal – there is no catch. SolarWinds provides this fully-functioning freebie, as part of their commitment to supporting the network management community.
New-SystemMessage -QuotaMessageType WarningMailbox -Language en -Text "Your mailbox is way too big delete some of your older or non-essential items."
New-SystemMessage -DsnCode 5.1.1 -Text "This recipient cannot be found in your Exchange Organization. Check the name spelling. If that does not work deleting your Outlook Cache and resend" -Internal $true -Language EN
Getting Started with PowerShell
I cover PowerShell basics elsewhere and I am assuming that you have a working knowledge of the cmdlets. Incidentally, I use PowerShell 2.0’s graphical ISE, rather than the command line version.
Summary of PowerShell New-SystemMessage
Here is an useful PowerShell command to customize error messages should Exchange 2010 be unable to deliver an email.
Import users from a spreadsheet, complete with their mailbox. Just provide a list of the users with the fields in the top row, and save as .csv file. Then launch this FREE utility, match your Exchange fields with AD’s attributes, click and import the users. Optionally, you can provide the name of the OU where the new mailboxes will be born.
- Bulk-import new users and mailboxes into Active Directory.
- Seek and zap unwanted user accounts.
- Find inactive computers.
If you like this page then please share it with your friends