Exchange Management Shell Results Field Truncated output
Hi
When I run the followng command the results are being truncated with ellipsises; I have tried $FormatEnumerationLimit =-1 and rerunning the command with no change in output.
get-transportserver | Get-MessageTrackingLog -ResultSize Unlimited -Start “5/1/2011 12:00AM” -End “5/20/2011 12:00AM” -eventid receive | WHERE {$_.recipients -like “*domain”} > "c:\results.txt"
SAMPLE RESULT
EventId Source Sender Recipients
MessageSubject
------- ------ ------ ---------- --------------
RECEIVE SMTP support-newslette...
{bob@domain... Replica Watches ...
Thanks
May 19th, 2011 7:13pm
You'll need to use format-list if you want to see all the data.[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
May 19th, 2011 7:27pm
Hi Satnam,
That means you could use as below:
get-transportserver | Get-MessageTrackingLog -ResultSize Unlimited -Start “5/1/2011 12:00AM” -End “5/20/2011 12:00AM” -eventid receive | WHERE {$_.recipients -like “*domain”} |fl > c:\results.txt
Regards!
Gavin
TechNet Subscriber Support
in forum
If you have any feedback on our support, please contact
tngfb@microsoft.com
Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
May 20th, 2011 4:57am
Hi
Thanks for the tip, that works great, but since I need to import the results into Excel, I am trying to get the correct output via format-table.
Satnam
Free Windows Admin Tool Kit Click here and download it now
May 20th, 2011 10:07am
Don't try to use format-table if you want to pull it into Excel, use exporet-csv.
You'll need to massage the data firs if you want to include any of the multi-valued properties (like recpients).[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
May 20th, 2011 10:37am
Thanks for the suggestion, since I am new to powershell, I will google some articles and try it out.
Free Windows Admin Tool Kit Click here and download it now
May 25th, 2011 1:41pm
I ended up using the following to resolve my issue.
Format-Table -AutoSize | Out-String -Width 20000
May 31st, 2011 4:51pm