Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Exchange Message Tracking Powershell Error

Posted on 2016-08-12
Medium Priority
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&Email@comcast.net -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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 16

Expert Comment

ID: 41754231
try entering the command like this         -recipients Test"&"Email@comcast.net
LVL 43

Accepted Solution

Adam Brown earned 1000 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 1000 total points
ID: 41754235
just like Adam Brown stated              -recipients 'Test&Email@comcast.net'

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

New style of hardware planning for Microsoft Exchange server.
Know the reasons and solutions to move/import EDB to New Exchange Server. Also, find out how to recover an Exchange .edb file and to restore the file back.
In this video we show how to create a Shared Mailbox 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 >> Sha…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

618 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