?
Solved

Exchange Message Tracking Powershell Error

Posted on 2016-08-12
5
Medium Priority
?
68 Views
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
track.html"


Error:
& : Ampersand not allowed. The & operator is reserved for future use; use "&" to pass ampersand as a string.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : AmpersandNotAllowed
0
Comment
Question by:Rob Shorts
[X]
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
5 Comments
 
LVL 16

Expert Comment

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

Accepted Solution

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

Assisted Solution

by:FOX
FOX earned 1000 total points
ID: 41754235
just like Adam Brown stated              -recipients 'Test&Email@comcast.net'
1
 

Author Closing Comment

by:Rob Shorts
ID: 41754243
Thank you
0
 
LVL 8

Expert Comment

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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Unified and professional email signatures help maintain a consistent company brand image to the outside world. This article shows how to create an email signature in Exchange Server 2010 using a transport rule and how to overcome native limitations …
There are times when we need to generate a report on the inbox rules, where users have set up forwarding externally in their mailbox. In this article, I will be sharing a script I wrote to generate the report in CSV format.
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Suggested Courses

777 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