Error while exporting Output to SpreadSheet from exchange shell
Hi All, I ran the below command from exchange shell Get-DistributionGroup -Identity "dleaiwbi-info" | Select Alias, AcceptMessagesonlyfromI get the Alias and AcceptMessageOnlyFrom details in the shell windows perfectly fine. However, when i try to run the same command with the export-csv switch i have problem in the output file.Get-DistributionGroup -Identity "dleaiwbi-info" | Select Alias, AcceptMessagesonlyfrom | export-csv "filename.csvI get the Alias into the spreadsheet as expected coming to AcceptMessagesOnlyFrom Column, this is what i see. Microsoft.Exchange.Data.MultiValuedProperty`1[Microsoft.Exchange.Data.Directory.ADObjectId]. :-( Makes no sense to me at all. How can i over come this, i tried both select and format-table options. The whole point is i am trying to run this command to get list of all dl's in our environment and any delivery restrictions on those dl's. Especially looking for who are allowed to send emails to these dl's. Please sugest how can get this output to spreadsheet, Thanks in advance for all your help. Just to share another problem of mine in similar lines: Issue: I used to copy paste the command from message tracking and use export-csv to get the output to spreadsheet. Now, when i do the same ..under recipient coulumn System.String[] Thanks Shiv
April 10th, 2009 12:01am

Hey Shiv, I wrote a guide with examples on exporting multivalued properties in powershell that should help you... PowerShell: Export Multivalued Properties http://exchangeshare.wordpress.com/2008/12/10/powershell-export-multivalued-properties/ Amit Tank | MVP - Exchange | MCITP:EMA MCSA:M | http://ExchangeShare.WordPress.com
Free Windows Admin Tool Kit Click here and download it now
April 10th, 2009 7:47am

Hey Amit,Thanks a lotfor that .. was vey helpful.Request you tohelp me with the second issue too which is in similar lines.I get System.String[] under recipientscolumnbut not the actual email adrress of the recipients when i try pasting the command generated by EMC in EMS during Message Tracking to export it to csv file.one more question... i get the members of a distribution group when i use get-distributiongroupmember. Now, the masterdl is having 10 more dl's as members init,so i am trying toexpand andget the actual members email addresses to be exported to a csv file. :-( No luck with googleLastly, is there a command to get actual count of members in a dl to a csv file. creteria: it has few more dl's as members in the master dl.EG: Name Countdl test 5000
April 10th, 2009 1:29pm

My responses in below thread help you on message tracking problem.... http://social.technet.microsoft.com/Forums/en-US/exchangesvrgeneral/thread/82ae511e-4400-4f53-9412-f5f642766445/ I didn't get chance to develop a powershell script to scan nested groups, I have a vb script which can help you to export users from nested DLs and count it manually by opening file in xls. http://exchangeshare.wordpress.com/2007/10/30/vbscript-write-group-membership-information-to-a-text-file/ Amit Tank | MVP - Exchange | MCITP:EMA MCSA:M | http://ExchangeShare.WordPress.com
Free Windows Admin Tool Kit Click here and download it now
April 10th, 2009 2:49pm

Hey Amit, Thanks a lot again for your immediate response. I have a doubt over here, i tested by sending few mails to only one recipient and when iran the same command get-messagetracking and try to export the output to csv it still says system string under the recipients column.Any clue why it says when i am sending mails to only one recipient. Thanks Shiv
April 10th, 2009 3:41pm

Do you get proper result in EMS and is it just happening while exporting to CSV? Can you post the cmdlet which you use to get result in EMS and also while exporting result to CSV?Amit Tank | MVP - Exchange | MCITP:EMA MCSA:M | http://ExchangeShare.WordPress.com
Free Windows Admin Tool Kit Click here and download it now
April 10th, 2009 4:13pm

Hey Amit, Yes, it works in EMC. It just does not work when i export the report to a csv file. I just do | Export-csv. I am not using Select switch also. Now, in the report all the fields like sender etc populate with correct info. only the columns "Recipients" and "Recipient status" populate with "system string[]". Thanks for your help in this. Shiv
April 10th, 2009 4:27pm

If you need the output i can mail it. because i dont see an option of attching the output file here. Thanks again !!!
Free Windows Admin Tool Kit Click here and download it now
April 10th, 2009 4:59pm

Hey Amit, COMMAND: [PS] H:\>get-messagetrackinglog -Sender "siva@xcelenergy.com" -Server "exhcplc02" -Start "4/10/2009 4:00:00 AM" -End "4/10/2009 5:30:00 AM" EventId Source Sender Recipients MessageSubject ------- ------ ------ ---------- -------------- RECEIVE STORE... siva@xcelenergy.com {Bhaskara.R.Baliv... Test Message Tra...DELIVER STORE... siva@xcelenergy.com {Bhaskara.R.Baliv... Test Message Tra...RECEIVE STORE... siva@xcelenergy.com {Abhishek.Gupta@x... Test Message Tra...DELIVER STORE... siva@xcelenergy.com {Abhishek.Gupta@x... Test Message Tra...RECEIVE STORE... siva@xcelenergy.com {Abhishek.Gupta@x... Test Message Tra...DELIVER STORE... siva@xcelenergy.com {Abhishek.Gupta@x... Test Message Tra...I run the same command with Export-Csv "filename.csv" COMMAND: [PS] H:\>get-messagetrackinglog -Sender "siva@xcelenergy.com" -Server "exhcplc02" -Start "4/10/2009 4:00:00 AM" -End "4/10/2009 5:30:00 AM" | Export-Csv "Message Tracking.csv"OUTPUT: #TYPE Microsoft.Exchange.Management.TransportLogSearchTasks.MessageTrackingEventTimestamp,ClientIp,ClientHostname,ServerIp,ServerHostname,SourceContext,ConnectorId,Source,EventId,InternalMessageId,MessageId,Recipients,RecipientStatus,TotalBytes,RecipientCount,RelatedRecipientAddress,Reference,MessageSubject,Sender,ReturnPath,MessageInfo"4/10/2009 4:39:25 AM",170.152.4.246,EXMAIL03.corp.xcelenergy.com,170.152.4.234,exhcplc02,,,STOREDRIVER,RECEIVE,14651606,<077F1F7C031163479F4EEB7BF1FC5D1E319DA92B85@EXMAIL03.corp.xcelenergy.com>,System.String[],System.String[],4024,1,,,"Test Message Tracking 1 ",siva@xcelenergy.com,siva@xcelenergy.com,04I:"4/10/2009 4:39:26 AM",,exhcplc02,,exmail02,,,STOREDRIVER,DELIVER,14651606,<077F1F7C031163479F4EEB7BF1FC5D1E319DA92B85@EXMAIL03.corp.xcelenergy.com>,System.String[],System.String[],4268,1,,,"Test Message Tracking 1 ",siva@xcelenergy.com,siva@xcelenergy.com,"4/10/2009 4:39:25 AM""4/10/2009 4:40:05 AM",170.152.4.246,EXMAIL03.corp.xcelenergy.com,170.152.4.234,exhcplc02,,,STOREDRIVER,RECEIVE,14651626,<077F1F7C031163479F4EEB7BF1FC5D1E319DA92B87@EXMAIL03.corp.xcelenergy.com>,System.String[],System.String[],3936,1,,,"Test Message Tracking 3",siva@xcelenergy.com,siva@xcelenergy.com,04I:"4/10/2009 4:40:06 AM",,exhcplc02,,exmail01,,,STOREDRIVER,DELIVER,14651626,<077F1F7C031163479F4EEB7BF1FC5D1E319DA92B87@EXMAIL03.corp.xcelenergy.com>,System.String[],System.String[],4180,1,,,"Test Message Tracking 3",siva@xcelenergy.com,siva@xcelenergy.com,"4/10/2009 4:40:05 AM""4/10/2009 4:40:26 AM",170.152.4.246,EXMAIL03.corp.xcelenergy.com,170.152.4.234,exhcplc02,,,STOREDRIVER,RECEIVE,14651634,<077F1F7C031163479F4EEB7BF1FC5D1E319DA92B88@EXMAIL03.corp.xcelenergy.com>,System.String[],System.String[],3936,1,,,"Test Message Tracking 4",siva@xcelenergy.com,siva@xcelenergy.com,04I:"4/10/2009 4:40:26 AM",,exhcplc02,,exmail01,,,STOREDRIVER,DELIVER,14651634,<077F1F7C031163479F4EEB7BF1FC5D1E319DA92B88@EXMAIL03.corp.xcelenergy.com>,System.String[],System.String[],4180,1,,,"Test Message Tracking 4",siva@xcelenergy.com,siva@xcelenergy.com,"4/10/2009 4:40:26 AM"Thanks again !!!
April 10th, 2009 5:31pm

Try this out:get-messagetrackinglog -Sender "siva@xcelenergy.com" -Server "exhcplc02" -Start "4/10/2009 4:00:00 AM" -End "4/10/2009 5:30:00 AM" >Trackinglog.csv One friendly advice though, make sure you change your internal server names and sensitive information before you paste the logs output to public places. :) Milind Naphade | MCTS:M | http://www.msexchangegeek.com
Free Windows Admin Tool Kit Click here and download it now
April 10th, 2009 5:40pm

Please use the format below to export the recipients without System.String issue Get-MessageTrackingLog -Start "03/04/2009 6:00AM" -End "04/10/2009 7:00PM" -Server SGC Sender jackbaucer@sg.com | Select-Object Timestamp,Sender, {$_.recipients}, MessageSubject | export-csv c:\MsgTrack.csv
April 13th, 2009 6:39am

This worked. Thanks
Free Windows Admin Tool Kit Click here and download it now
April 15th, 2009 2:34am

Thank you very much, James.Your suggestion saved hours and hours of my job.Congratulations.Thiago Mendes
October 29th, 2009 6:18pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics