PowerShell New-SystemMessage

Introduction to Exchange 2010 New-SystemMessageExchange 2010 PowerShell New-SystemMessage

Here is an useful PowerShell cmdlet to customise DSN messages for your Exchange organization.

Topics for PowerShell New-SystemMessage


PowerShell Assumptions

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.

New-SystemMessage Syntax

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.

Example 1: New-SystemMessage HTML

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 &quot;InfoSec&quot; for more information.’ -Internal $true -Language En

Note 1:  The language is English (En) and the message is for internal users only ($true).

Research Parameters for New-SystemMessage with Get-Command

Get-Help New-SystemMessage -full

Note 2:   You can also specify a Domain Controller, also Get-Help reveals the handy -WhatIf parameter.

See more on PowerShell’s New-SystemMessage for Exchange 2010.

Free Download of Exchange Monitor from SolarWindsGuy Recommends: The SolarWinds Exchange Monitor

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.

Free Download of SolarWinds Exchange Monitor

Example 2: New-SystemMessage – Write Mailbox Quota Warning

New-SystemMessage -QuotaMessageType WarningMailbox -Language en -Text "Your mailbox is way too big delete some of your older or non-essential items."

Example 3: -DsnCode 5.1.1

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.

Guy Recommends:  SolarWinds’ Free Bulk Mailbox Import ToolFree Download Bulk Mailbox Import Tool

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.

There are also two bonus tools in the free download, and all 3 have been approved by Microsoft:

  1. Bulk-import new users and mailboxes into Active Directory.
  2. Seek and zap unwanted user accounts.
  3. Find inactive computers.

Download your FREE bulk mailbox import tool.

If you like this page then please share it with your friends


See more PowerShell Cmdlets for Exchange 2010:

Exchange 2010 Home   • Get-ExchangeServer   • Set-ExchangeServer   • New-SystemMessage   • SP1

Get-Mailbox   • Get-MailboxStatistics   • Connect-Mailbox   • Enable-Mailbox   • Disable-Mailbox

PowerShell Exchange Cmdlets   • Set-Contact    • New-Mailcontact   • Add-MailboxPermission -identity