Assuming that I must be doing something wrong here

Get-MessageTrackingLog : Cannot bind parameter 'Start'. Cannot convert value 
"[datetime]::Parse" to type
"System.DateTime". Error: "String was not recognized as a valid DateTime."
At line:1 char:81
+ ... rm.com" -Start [datetime]::Parse( "05/02/2013 00:01AM") -End 
[datetime]::Parse(  ...
+                    ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-MessageTrackingLog], 
ParameterBindingException
    + FullyQualifiedErrorId : 
CannotConvertArgumentNoMessage,Microsoft.Exchange.Management.TransportLogSearchTasks.Get
   MessageTrackingLog

----------------------------------
Joe Louis


From: [email protected] [mailto:[email protected]] On 
Behalf Of Michael B. Smith
Sent: Wednesday, May 08, 2013 2:06 PM
To: [email protected]
Subject: RE: [Exchange] Exchange 2007: get-messagetrackinglog wont filter


Your servers are installed with the en-us locale?



Would you be willing to try this:


                get-messagetrackinglog -server myserver -recipients 
"myaddress@mydomain" `
                                -Start [datetime]::Parse( "05/02/2013 00:01AM") 
-End [datetime]::Parse( "05/02/2013 01:01AM" ) `
                                -EventID RECEIVE | ft timestamp, sender, 
messagesubject



Note the line continuation characters.



I would appreciate it.



-----Original Message-----
From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Louis, Joe
Sent: Wednesday, May 8, 2013 1:47 PM
To: [email protected]<mailto:[email protected]>
Subject: RE: [Exchange] Exchange 2007: get-messagetrackinglog wont filter



Thanks. That still had no impact though. I'm still getting items well past the 
-end time (11:48am in the same day).



As much as I'd hate to do this, I'll just run the query at 11:59pm to get past 
this.



----------------------------------

Joe Louis





-----Original Message-----

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Michael B. Smith

Sent: Tuesday, May 07, 2013 5:55 PM

To: [email protected]<mailto:[email protected]>

Subject: RE: [Exchange] Exchange 2007: get-messagetrackinglog wont filter



This is an issue with the date format supported by get-messagetrackinglog. This 
was fixed in Exchange 2010 to use a locale specific date.



In your example:



                get-messagetrackinglog -server myserver -recipients 
"myaddress@mydomain" -Start "5/2/2013 00:01AM" -End "5/2/2013 1:01AM" -EventID 
RECEIVE | ft timestamp, sender, messagesubject



Do it this way:



                get-messagetrackinglog -server myserver -recipients 
"myaddress@mydomain" -Start "05/02/2013 00:01AM" -End "05/02/2013 01:01AM" 
-EventID RECEIVE | ft timestamp, sender, messagesubject



Regards,

Michael B.



-----Original Message-----

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Louis, Joe

Sent: Monday, May 6, 2013 10:21 AM

To: [email protected]<mailto:[email protected]>

Subject: RE: [Exchange] Exchange 2007: get-messagetrackinglog wont filter



At first, I thought so too but I've checked that several times against current 
mail in my mailbox (just rechecked). It is definitely something in the -end. 
-Start works as I would expect.



----------------------------------

Joe Louis



-----Original Message-----

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Rubens Almeida

Sent: Sunday, May 05, 2013 2:18 PM

To: [email protected]<mailto:[email protected]>

Subject: RE: [Exchange] Exchange 2007: get-messagetrackinglog wont filter



by -end

MIME-Version: 1.0

Content-Type: multipart/alternative;

                
boundary="_000_9CBFBD577E45BB44B7F61B50D9996CC6029976051166e1STAYOUTNE_"



This is a multi-part message in MIME format.

--_000_9CBFBD577E45BB44B7F61B50D9996CC6029976051166e1STAYOUTNE_

Content-Type: text/plain; charset="utf-8"

Content-Transfer-Encoding: 7bit



Maybe something related to the UTC date format?



http://technet.microsoft.com/en-us/library/cc539064.aspx



Sent from my Windows Phone

From: Louis, Joe

Sent: 5/3/2013 18:05

To: [email protected]<mailto:[email protected]>

Subject: [Exchange] Exchange 2007: get-messagetrackinglog wont filter by -end 
Got a weird one. I've been asked to provide a count of messages that come to a 
specific address in a day. For some reason, when I specify the -end, the 
timestamp results always go past the upper limit.



[PS] H:\>get-messagetrackinglog -server myserver -recipients 
"myaddress@mydomain" -Start "5/2/2013 00:01AM" -End "5/2/2013 1:01AM"

-EventID RECEIVE | ft timestamp, sender, messagesubject



Understanding that there shouldn't have been anything returned on this 
start/end, the results go out long past the hour specified.



Timestamp

---------

5/2/2013 1:26:37 AM

5/2/2013 1:26:40 AM

5/2/2013 7:51:11 AM

5/2/2013 8:22:05 AM

5/2/2013 8:26:33 AM

5/2/2013 8:51:24 AM

5/2/2013 8:53:22 AM

5/2/2013 9:00:08 AM

5/2/2013 9:57:10 AM

5/2/2013 9:59:13 AM

5/2/2013 10:07:55 AM

5/2/2013 11:10:46 AM

5/2/2013 11:18:00 AM

5/2/2013 11:23:33 AM



If I make the end date "5/2/2012 11:59PM", I get results including 5/3 2:43pm.



What am I doing wrong here? Googlefoo is failing to produce anything other than 
what I've been doing.



----------------------------------

Joe Louis







--_000_9CBFBD577E45BB44B7F61B50D9996CC6029976051166e1STAYOUTNE_

Content-Type: text/html; charset="utf-8"

Content-Transfer-Encoding: quoted-printable



<html><head><meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Cont= 
ent-Type"></head><body><div><div style=3D"font-family: Calibri,sans-serif; =

font-size: 11pt;">Maybe something related to the UTC date format?<br><br>ht= 
tp://technet.microsoft.com/en-us/library/cc539064.aspx<br><br>Sent from my = 
Windows Phone<br></div></div><hr><span style=3D"font-family: Tahoma,sans-se= 
rif; font-size: 10pt; font-weight: bold;">From: </span><span style=3D"font-=

family: Tahoma,sans-serif; font-size: 10pt;">Louis, Joe</span><br><span sty=

le=3D"font-family: Tahoma,sans-serif; font-size: 10pt; font-weight: bold;">=

Sent: </span><span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt=

;">5/3/2013 18:05</span><br><span style=3D"font-family: Tahoma,sans-serif; =

font-size: 10pt; font-weight: bold;">To: </span><span style=3D"font-family:=  
Tahoma,sans-serif; font-size: 
10pt;">[email protected]</span><b<mailto:[email protected]%3c/span%3e%3cb>=

r><span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt;

r>font-weig=

ht: bold;">Subject: </span><span style=3D"font-family: Tahoma,sans-serif; f=

ont-size: 10pt;">[Exchange] Exchange 2007: get-messagetrackinglog wont filt= er 
by -end</span><br><br></body></html><html xmlns:v=3D"urn:schemas-microso= 
ft-com:vml" xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:w=3D"= 
urn:schemas-microsoft-com:office:word" xmlns:m=3D"http://schemas.microsoft.=

com/office/2004/12/omml" xmlns=3D"http://www.w3.org/TR/REC-html40";><head><m=

eta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii"><me= ta 
name=3DGenerator content=3D"Microsoft Word 14 (filtered medium)"><style>=

<!--

/* Font Definitions */

@font-face

=09{font-family:"Cambria Math";

=09panose-1:2 4 5 3 5 4 6 3 2 4;}

@font-face

=09{font-family:Calibri;

=09panose-1:2 15 5 2 2 2 4 3 2 4;}

/* Style Definitions */

p.MsoNormal, li.MsoNormal, div.MsoNormal =09{margin:0in; 
=09margin-bottom:.0001pt; =09font-size:11.0pt; 
=09font-family:"Calibri","sans-serif";}

a:link, span.MsoHyperlink

=09{mso-style-priority:99;

=09color:blue;

=09text-decoration:underline;}

a:visited, span.MsoHyperlinkFollowed

=09{mso-style-priority:99;

=09color:purple;

=09text-decoration:underline;}

span.EmailStyle17

=09{mso-style-type:personal-compose;

=09font-family:"Calibri","sans-serif";

=09color:windowtext;}

.MsoChpDefault

=09{mso-style-type:export-only;

=09font-family:"Calibri","sans-serif";}

@page WordSection1

=09{size:8.5in 11.0in;

=09margin:1.0in 1.0in 1.0in 1.0in;}

div.WordSection1

=09{page:WordSection1;}

--></style><!--[if gte mso 9]><xml>

<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if 
gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" 
data=3D"1" /> </o:shapelayout></xml><![endif]--></head><body lang=3DEN-US 
link=3Dblue vli= nk=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal>Got 
a weird one.=  I&#8217;ve been asked to provide a count of messages that come 
to a specif= ic address in a day. For some reason, when I specify the 
&#8211;end, the ti= mestamp results always go past the upper limit. 
<o:p></o:p></p><p class=3DM=

soNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>[PS]

soNormal>H:\&gt;get-messaget=

rackinglog -server myserver -recipients &quot;myaddress@mydomain&quot; -Sta= rt 
&quot;5/2/2013 00:01AM&quot; -End &quot;5/2/2013 1:01AM&quot; -EventID R= 
ECEIVE | ft timestamp, sender, messagesubject<o:p></o:p></p><p class=3DMsoN=

ormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Understanding that there

ormal>sh=

ouldn&#8217;t have been anything returned on this start/end, the results go=  
out long past the hour specified. <o:p></o:p></p><p class=3DMsoNormal><o:p=

>&nbsp;</o:p></p><p class=3DMsoNormal>Timestamp<o:p></o:p></p><p

>class=3DMs=

oNormal>---------<o:p></o:p></p><p class=3DMsoNormal>5/2/2013 1:26:37

oNormal>AM<o:=

p></o:p></p><p class=3DMsoNormal>5/2/2013 1:26:40 AM<o:p></o:p></p><p

p>class=

=3DMsoNormal>5/2/2013 7:51:11 AM<o:p></o:p></p><p class=3DMsoNormal>5/2/201=

3 8:22:05 AM<o:p></o:p></p><p class=3DMsoNormal>5/2/2013 8:26:33 AM<o:p></o= 
:p></p><p class=3DMsoNormal>5/2/2013 8:51:24 AM<o:p></o:p></p><p class=3DMs=

oNormal>5/2/2013 8:53:22 AM<o:p></o:p></p><p class=3DMsoNormal>5/2/2013

oNormal>9:0=

0:08 AM<o:p></o:p></p><p class=3DMsoNormal>5/2/2013 9:57:10 AM<o:p></o:p></=

p><p class=3DMsoNormal>5/2/2013 9:59:13 AM<o:p></o:p></p><p

p>class=3DMsoNorm=

al>5/2/2013 10:07:55 AM<o:p></o:p></p><p class=3DMsoNormal>5/2/2013

al>11:10:4=

6 AM<o:p></o:p></p><p class=3DMsoNormal>5/2/2013 11:18:00 AM<o:p></o:p></p>= <p 
class=3DMsoNormal>5/2/2013 11:23:33 AM<o:p></o:p></p><p class=3DMsoNorma=

l><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>If I make the end date

l>&#8220;5=

/2/2012 11:59PM&#8221;, I get results including 5/3 2:43pm. <o:p></o:p></p>= <p 
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>What am I do= ing 
wrong here? Googlefoo is failing to produce anything other than what I&= 
#8217;ve been doing. <o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p><=

/p><p class=3DMsoNormal>----------------------------------<o:p></o:p></p><p=

class=3DMsoNormal><b><span style=3D'font-size:10.0pt;font-family:"Arial","=

sans-serif"'>Joe Louis</span></b><o:p></o:p></p><p class=3DMsoNormal><o:p>&= 
nbsp;</o:p></p></div></body></html>



--_000_9CBFBD577E45BB44B7F61B50D9996CC6029976051166e1STAYOUTNE_--

















Reply via email to