Exchange Message Tracking Powershell Error

Posted on 2016-08-12
Last Modified: 2016-08-13
I'm trying to track message on exchange 2010, but am getting the following error using the "&" character.  and getting the error below.  Is there any way around this?

Get-Transportserver | Get-MessageTrackingLog -recipients Test& -Start "08/11/2016 11:00:00" -End "08/12/2016 12:00:00" | Select-Object eventid,sender,timestamp,@{Name="Recipients";Expression=$_.recipients}},@Name="RecipientStatus";Expression={$_.recipientstatus}},messagesubject | ConvertTo-Html > "g:\temp\message

& : Ampersand not allowed. The & operator is reserved for future use; use "&" to pass ampersand as a string.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : AmpersandNotAllowed
Question by:Rob Shorts
LVL 16

Expert Comment

ID: 41754231
try entering the command like this         -recipients Test"&"
LVL 39

Accepted Solution

Adam Brown earned 250 total points
ID: 41754233
Put the quotes around the entire email address if there are special characters in it.
LVL 16

Assisted Solution

FOX earned 250 total points
ID: 41754235
just like Adam Brown stated              -recipients 'Test&'

Author Closing Comment

by:Rob Shorts
ID: 41754243
Thank you

Expert Comment

by:Senior IT System Engineer
ID: 41754630
What's the difference between single quote and double quote ?

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question