Search found 145 matches

by ITEngineer
Tue Jun 26, 2018 10:11 pm
Forum: Windows PowerShell
Topic: PowerShell to parse Exchange message tracking not working ?
Replies: 13
Views: 1586

Re: PowerShell to parse Exchange message tracking not working ?

I've swapped the DD/MM/YYYY with MM/DD/YYYY, However the error message is now just like below repeated 15x as the number of my Exchange servers: The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties ...
by ITEngineer
Tue Jun 26, 2018 9:23 pm
Forum: Windows PowerShell
Topic: PowerShell to parse Exchange message tracking not working ?
Replies: 13
Views: 1586

Re: PowerShell to parse Exchange message tracking not working ?

Thanks for the assistance in this matter, somehow it is still displaying the same issue: Cannot convert value "1/03/2018 3:00:00 PM" to type "System.DateTime". Error: "String was not recognized as a valid DateTime." At C:\Users\Admin\AppData\Local\Temp\12567d90-4897-4db9-856c-8ae0385a7fde.ps1:5 char...
by ITEngineer
Tue Jun 26, 2018 7:11 pm
Forum: Windows PowerShell
Topic: PowerShell to parse Exchange message tracking not working ?
Replies: 13
Views: 1586

PowerShell to parse Exchange message tracking not working ?

Hi All, I need some help in fixing the below PowerShell script for Exchange Server message tracking log. Basically, the script is searching for all NDR (email with the subject "*Undeliverable: *" ) that is delivered within the specific time frame, in the case above is 1st March 2018 until today 27th...
by ITEngineer
Wed Jun 06, 2018 7:55 pm
Forum: Windows PowerShell
Topic: Exchange PowerShell Unable to export list to CSV ?
Replies: 15
Views: 1655

Re: Exchange PowerShell Unable to export list to CSV ?

That doesn't make any sense. If the output is correct then the CSV will reflect the output. You have some kind of mistake in the code and you are likely not using the exact code I posted. This would be a better way to do this: $inputFile = 'C:\trackingemail.csv' $trackparams = @{ Start = (Get-Date)...
by ITEngineer
Wed Jun 06, 2018 7:34 pm
Forum: Windows PowerShell
Topic: Exchange PowerShell Unable to export list to CSV ?
Replies: 15
Views: 1655

Re: Exchange PowerShell Unable to export list to CSV ?

Now tell me what this produces. foreach ($email in (Import-Csv $inputFile)) { Write-host "Email address: $($email.email)" $resultFile = "C:\$($email.email).CSV" $TransportServers = Get-TransportService $TransportServers | % { Get-Messagetrackinglog -Server $_.Name @trackparams -Recipients $email.em...
by ITEngineer
Wed Jun 06, 2018 6:59 pm
Forum: Windows PowerShell
Topic: Exchange PowerShell Unable to export list to CSV ?
Replies: 15
Views: 1655

Re: Exchange PowerShell Unable to export list to CSV ?

And what does this show you? foreach ($email in (Import-Csv $inputFile)) { Write-host "Email address: $($email.email)" $resultFile = "C:\$($email.email).CSV" $TransportServers = Get-TransportService $TransportServers | % { Get-Messagetrackinglog -Server $_.Name @trackparams -Recipients $email.email...
by ITEngineer
Wed Jun 06, 2018 6:36 pm
Forum: Windows PowerShell
Topic: Exchange PowerShell Unable to export list to CSV ?
Replies: 15
Views: 1655

Re: Exchange PowerShell Unable to export list to CSV ?

Is that what you want? Where is the data. Look like a bunch of headers to me. I only want these as the content of the each respective .CSV file: Name Count ---- ----- no-reply@email.com 123 no-reply@email2.com 93 Alert@email2.com 67 Now run this to see what you get. It works to display the result i...
by ITEngineer
Wed Jun 06, 2018 6:20 pm
Forum: Windows PowerShell
Topic: Exchange PowerShell Unable to export list to CSV ?
Replies: 15
Views: 1655

Re: Exchange PowerShell Unable to export list to CSV ?

Now run this to see what you get. foreach ($email in (Import-Csv $inputFile)) { Write-host "Email address: $($email.email)" $TransportServers = Get-TransportService $TransportServers | % { Get-Messagetrackinglog -Server $_.Name @trackparams -Recipients $email.email | ? { $_.Sender -notmatch $rxDoma...
by ITEngineer
Wed Jun 06, 2018 5:54 pm
Forum: Windows PowerShell
Topic: Exchange PowerShell Unable to export list to CSV ?
Replies: 15
Views: 1655

Re: Exchange PowerShell Unable to export list to CSV ?

Then add one line at a time until you have found the issue. Time to learn how to debug a script … eh? Yes, I ahve removed the line Export-CSV $resultFile -NoTypeInformation from the original script and the result is displayed on the console. But how to export it to the respective .CSV file ? hence ...
by ITEngineer
Wed Jun 06, 2018 5:29 pm
Forum: Windows PowerShell
Topic: Exchange PowerShell Unable to export list to CSV ?
Replies: 15
Views: 1655

Re: Exchange PowerShell Unable to export list to CSV ?

Run as follows to be sure you are getting any results. foreach ($email in (Import-Csv $inputFile)) { Write-host "Email address: $($email.email)" Get-TransportService | ForEach-Object { Get-Messagetrackinglog -Server $_.Name @trackparams -Recipients $email.email } } Yes, Mr. Vierra, I got lots of co...