How to outpout messagetracking results to csv format so that each recipient smtp addresses is on a seperate row?

I've searched far and wide today to no avail. The basic issue is someone sent an email to a DL, and I want a list of people who received this email. Simple right? While Powershell is AWESOME.. some simple things turn into nightmares.. case in point. Here
is my powershell command..
Get-ExchangeServer | where {$_.IsHubTransportServer -eq "true"} | sort-object Name | get-messagetrackinglog -ResultSize unlimited -sender [email protected] -EventID "deliver" -Start "05/14/2013 10:00:00 AM" -End "05/14/2013
12:00:00 PM" -messagesubject "I can't figure this out" | select-object timeStamp,eventid,ServerHostName,Sender,@{Name=”Recipients”;Expression={[string]::join(";", ($_.recipients))}} ,MessageSubject | Export-csv c:\sent1.csv -notypeinformation
This works, exactly as I expect but here is the BIG problem. #_.recipients is a string value, and this email was sent to A DL, with nested groups. So when I open the results, there are rows that have multiple recipient smtp addresses in the same row.
So the output looks like this in Excel.  Normally this works fine, but I think the issue is that this was a DL, and in the output CSV I see rows that contain 1 recipient and others may contain 20 on the same row. Any suggestions on how I can fix
this?
Timestamp        
Sender Recipients          
Recipients
5/14/2013 10:46 [email protected]      
[email protected];[email protected];[email protected]
What I want is this..
Timestamp        
Sender Recipients          
Recipients
5/14/2013 10:46 [email protected]      
[email protected];
5/14/2013 10:46 [email protected]      
[email protected];
5/14/2013 10:46 [email protected]      
[email protected] 

Hi,
Here you go.. 
I got the help from Vinith Menon who is part of Bangalore Powershell User Group. Thanks a lot Vinith :-)
Save the below script as ps1 and execute it, make sure you are matching the servername, date, subject
$new=get-messagetrackinglog -server "Server Name" -sender [email protected] -Start "5/12/2013 8:59:13 PM" -messagesubject "mytest" | select-object timeStamp,Sender,*subject,@{Name="Recipients";Expression={[string]::join(";", ($_.recipients))}}
foreach ($n in $new)
$values = $n | ForEach-Object {$_.recipients.split(";")}
$count = $n | ForEach-Object {$_.recipients.split(";")} | Measure-Object | select -ExpandProperty count
for ($i=0;$i-lt $count;$i++)
$array1 += $n | select timestamp,sender,*subject,@{Name=”Recipients”;Expression={$values[$i]}}
$array1
Kottees : My Blog : Please mark it as an answer if it really helps you.

Similar Messages

  • HT1479 I would like to know how to burn a dvd in such a way that each image can be skipped over by pressing the skip button.

    I would like to know how to burn a dvd in such a way that each image can be skipped over by pressing the skip button? If anyone could help it would be greatly appreciated!

    Here's how top get a slideshow that will let the viewer manually control the forward and backward movement of the slides with the forward and back buttons on the DVD remote.
    1 - put the images you want to use in an iPhoto album.
    2 - launch iDVD, select a theme and add a slideshow using the "+" button at the bottom:
    3 - click on the Media button at the lower right hand corner of the window and then click on the Photos button.
    4 - locate the iPhoto album containing your photos and drag it into the left hand pane:
    5 - select Side Duration to Manual.
    In order to get the maximum manual control of the slides you cannot have add any music to the slideshow.  If you do add music the slideshow will continue you advance unless you pause the slideshow and/or use the advance/back buttons and then pause.
    Once you have the project as you want it save it as a disk image via the  File ➙ Save as Disk Image  menu option.  This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image and launch DVD Player and play it.  If it plays OK with DVD Player the encoding was good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    OT

  • TS3276 How do I send an email to several people without each recipient knowing who the other recipients are?

    How do I send an email to several people without each recipient knowing who the other recipients are? The message will have over 100 recipients.
    Tks

    When you compose a new message, use the Bcc field to enter the addresses.
    If you don't see one, you can enble it by pressing this button and selecting BCC Address Field.

  • How to get Report Output in csv format

    Hi,
    How can i get report Output in csv format, can any one tell me the word used for output type to get output in csv format.
    i have used XLS output type but it opens in excel format.
    conc.addLayout(appCode,concReqCode,"en-US","US",XLS);
    Thanks
    Babu

    Hi Babu,
    Till now in xmlpublisher there is no method to create file in csv format ,you have to create Excel file and then save it in .csv format.Unless and until ur using BI Publisher in which some work around are possible.
    Thanks

  • How to save WEBI report in CSV format on file system

    Hi
    I am trying to save a WEBI report from BO server in CSV format through java / BO SDK. Iam able to save report in html , pdf and xls format. Please provide a code snippet if available.
    I know for pdf and xls we directly use doc, binary view and for html there is HTMLVIEW. But iam not able to save it using CSV OutputFormatType
    thanks

    Hi,
    Just in case, I think that Shawn wanted to send the following link showing the different formats:
    http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/RE_SDK/resdk_dg_doc/doc/resdk_java_CustoWebI_dg/ewucw_053.html#1037054
    Cheers

  • How to convert XML attributes to CSV format at receiver?

    Hi,
    I have xml file.
    <x>
       <A a=1 b=1 c=2 d=4>
           <B b=1 e=4 f=5>1.2</B>
           <B b=5 e=6 f=5>1.001</B>
           <B b=7 e=4 f=5>1.2000</B>
       </A>
    </x>
    I need to convert it to csv format file.Can anyone help me on this?
    Thanks,
    Pachika.

    HI all,
    Please ignore this I given in detail problem in next thread.

  • How can I get the number of distinct records that each field of a DB table has?

    Hi everyone,
    I would like to know how to get he number of distinct records that each field of a DB table has. When tracing a SQL statement either in ST12 or ST05, in the plan execution, if the sentence made useage of an index, then I can click in the index name and see this kind of information (no. of distinct values for each field of that index).
    Can I do something like this but with the whole fields of a table?
    What I have found until now is in Tx ST10; I search for whatever kind of table statistics and then use the function of "Analyze table" (which takes me to Tx DB05). In here, I can enter a table and up to 5 fields in order to get the information that I want.
    Is there any other way to do this?
    Regards,
    David Reza

    Hi David,
    You can export the same to excel and sort as per requirement.
    Sorry is that what you are looking for ?
    Regards,
    Deepanshu Sharma

  • How to convert hierarchy XML to CSV format using PI/XI

    Hi All,
         I am working with SAP PI/XI for the first time and need some help file conversion of complex hierarchy XML to CSV file using PI. I have done plenty of research on SDN and could find much related to what I want to do.
    Here is the example of how my input XML would look like:
    <?xml version="1.0" encoding="UTF-8"?>
    <PartyMaster type="OrgHierarchy" name="Compass Group Owned">
        <PartyMasterHierarchy>
             <Hierarchy level="3" nodeName="Bon Appetit Sector" type="Sector" ID="A00000" refID="A00000">     
                   <Hierarchy level="4" nodeName="BA Division" type="Division" ID="AB0000" refID="AB0000" >               <Hierarchy level="5" nodeName="BA East Coast Region" type="Region" ID="ABE000" refID="ABE000">
                             <Hierarchy level="6" nodeName="Engstrom, John RVP" type="District" ID="ABE01" refID="ABE01" >
                             </Hierarchy>
                           </Hierarchy>
         </Hierarchy>
                    </Hierarchy>
                    <Hierarchy level="3" nodeName="Levy Sector" type="Sector" ID="K00000" refID="K00000".               <Hierarchy level="4" nodeName="Levy Sector Division" type="Division" ID="K90000" refID="K90000">              <Hierarchy level="5" nodeName="Levy Sector Region" type="Region" ID="K99000" refID="K99000">                   <Hierarchy level="6" nodeName="TBA Total" type="District" ID="K9901" refID="K9901">                        </Hierarchy>
              </Hierarchy>
         </Hierarchy>
                     </Hierarchy>
            </PartyMasterHierarchy>
    </PartyMaster>
    I would like to get CSV output in the format below
    *DISPLAY_NAME     DOCUMENT_DESCRIPTION      PARENT           EXTERNAL_ID     ORG_UNIT_TYPE*     
    Bon Appetit Sector     Bon Appetit Sector      constant value    A00000                       constant value
    Levy Sector          Levy Sector           constant value    K00000                 constant value
    BA Division          BA Division            A00000                 AB0000                       constant value
    Levy Sector Division         Levy Sector Division       K00000              K90000                       constant value
    BA East Coast Region     BA East Coast Region          AB0000             ABE000                        constant value
    Levy Sector Region     Levy Sector Region       K90000              K99000                        constant value
    Engstrom, John RVP     Engstrom, John RVP        ABE000               ABE01              constant value
    TBA Total                    TBA Total             K99000               K9901             constant value
    1) How do I go about this? I think I have to configure an adapter but which adapter would give me the desired result?
    2) How do I tell PI when to pick the file from and where to place it after conversion? Could this be done in adapter configuration?
    Any help will be greatly appreciated.
    Thanks.
    --Mithun

    Mithun,
    you would get lot of answers if you looking in the PI (process integration forum)... There is something calles File content coversion in XI file adapter (which can convert the xml to csv and viceversa)

  • How to Import a Timecard in CSV format in OTL

    OTL Guru's.
    I'm new to OTL, could you please guide me how to import a timecard from a CSV file using the existing APIs.
    Thanks,
    Himanshu

    Himanshu,
    There is a seeded functionality at user level which allows you to import timecard as a csv. But it will create one timecard at a time and you need to use a fixed format csv.
    If you are looking for mass timecard creation, use the OTL api to create timecards.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to get webservice result as "e4x" format in a professional solution?

    Hi. I want to get data from a .Net webservice as "e4x"
    format. It works when i use <mx notation to define the service
    in flex. However i want to build a more professional solution and
    want to implement the webservice as a class. But I can't get it to
    work such that i return the result as "e4x". Instead i get an
    object with arrays etc. The problems might be that i need to use
    the flex class operation to define "e4x" and then i need to bind
    the operation with the webservice but it seems that the webservice
    still doesn't know about to return the result as e4x. Here you see
    the code in <mx notation which is working fine:
    <mx:WebService id="WS" wsdl="
    http://localhost/testservice/service.asmx?WSDL"
    result="WS_onResult(event)" >
    <mx:operation name="HelloWorld" resultFormat="e4x" >
    <mx:request></mx:request>
    </mx:operation>
    </mx:WebService>
    And in the WS_onResult procedure i get the result by doing
    this:
    var xmlResult:XML = XML(event.result);
    As i said the above code is working fine but the code below
    doesn't work well because it doesn't return the result as "e4x":
    WS = new mx.rpc.soap.WebService();
    WS.wsdl = "
    http://localhost/testservice/service.asmx?WSDL";
    WS.addEventListener(LoadEvent.LOAD, load_listener);
    WS.addEventListener(ResultEvent.RESULT, result_listener);
    OP = new mx.rpc.soap.Operation(WS,"HelloWorld");
    WS.loadWSDL();
    And in the load procedure to perform the call:
    public function load_listener(event:LoadEvent):void {
    OP.resultFormat = "e4x";
    WS.HelloWorld.send();
    And in the result listener i get a result as object and NOT
    as "e4x". Can anyone help?
    Btw. here i add the .Net code:
    [WebMethod]
    public XmlElement HelloWorld() {
    XmlDocument doc = new XmlDocument();
    string xml = "<Test>this is a test</Test>";
    doc.LoadXml(xml);
    return doc.DocumentElement;
    }

    Hmm, try setting the resultFormat at the WS level. But what
    you have looks like it should work.
    Tracy

  • Do you have examples of CSV Format XML that can handle relationshiptypes?

    Hi,
    I have created a Windows Computer extended class that, for the sake of the example, has an additional property
    ServerNameRow , and a relationship (selected via Single Instance Picker control)
    BusinessUnitCustomersListPickerClass_Relationship. (The Single Instance Picker selects the primary name field/property only)
    I want to import data via CSV, and/or PowerShell. Both need a Format XML file.
    I don't know what the syntax is for relationship BusinessUnitCustomersListPickerClass_Relationship.
    What I'd need is some examples, preferably of a non-extended class and of an extended class's format XML.

    http://blogs.technet.com/b/servicemanager/archive/2009/05/26/using-the-csv-import-feature.aspx
    At the bottom of that blog post is an attachment (CSVImport.docx). It contains all the information you'll need for constructing CSV imports, including examples.
    To import relationships, you'll need to define a type projection targeting the windows computer class that contains a component for your custom relationship type.
    Also note you should not use the extension class itself in your definition file or in the type projection definition. Just use the windows computer class. Don't worry..your extension class property will be recognized by the import process. Extensions
    to a class are different than inherited classes.

  • How to split a result set into n-number ranges, each range has same max-min

    Hi guys,
    suppose there's a table T1(fvalue number),
    we can easily get the MAX and MIN of fvalue, for example, 19 and 5, I need to split them into, for example, 3 ranges, 5-9, 10-14, 15-19, they have the same max-min. And for each range, I need to know the count of rows that fall into this range.
    does anyone have any clues? is there any analytic function i can use to accomplish this?
    many thanks.

    There are the NTILE and WIDTH_BUCKET functions that may be of use. However, I'm not exactly sure what you are after.
    It is always helpful to provide the following:
    1. Oracle version (SELECT * FROM V$VERSION)
    2. Sample data in the form of CREATE / INSERT statements.
    3. Expected output
    4. Explanation of expected output (A.K.A. "business logic")
    5. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How do I permanetly save all my tabs so that each time I open firefox, I don't have to reo all my tabs?

    I have 4 tabs that I always use and I would like to know how I save them so that every time I open mozilla all 4 of those tabs are already there so that I don't have to manually create each new tab every time

    Firefox can store multiple home pages, set the 4 tabs as home pages, for details see https://support.mozilla.com/kb/How+to+set+the+home+page
    Then, in the Options Window, on the general panel, change the setting "When Firefox starts" to "Show my home page"

  • When sending an email how do I set the address when sending to multiple recipients so that each recipient only sees his or hers address and not everyone else

    I would like so send emails to multiple addresses yet I want each recipient to only see his or her address

    This question isn't related to Mozilla Firefox. However, I can still answer your question. In the 'to' field, put your own e-mail address and put each recipient's address in the BCC field. This way the only address seen is your own.
    Please try to post in the appropriate forum next time. (Thunderbird, Gmail, etc.)

  • Can Sentinel RD reports be in CSV format instead of PDF

    Hi,
    I am working with Sentinel RD and generating custom reports using
    iReport. I was wondering if I can generate a custom report where the
    output is in CSV format instead of PDF and can be scheduled in the same
    way as the PDF are.
    What do I need to do to achieve this?
    ankurrane
    ankurrane's Profile: http://forums.novell.com/member.php?userid=92392
    View this thread: http://forums.novell.com/showthread.php?t=428324

    Here is how to output report results in CSV format in SLM 1.1 (or
    later):
    STEP 1: Go to the $ESEC_CONFIG_HOME directory on your SLM server (It
    will be something like: /etc/opt/novell/sentinel_log_mgr/config).
    STEP 2: Open the file
    "obj-component.JasperReportingComponent.properties" for editing.
    STEP 3: Specify the following fields/values in that properties file:
    reporting.csv.enable=true
    reporting.csv.email=true
    reporting.csv.outputdir=/opt/mycsvreportresults
    STEP 4: Save the file.
    STEP 5: I *think* you have to restart the SLM server after making
    changes to any of these properties.
    Some things to take note of:
    NOTE 1: You can specify any directory (that the novell user has
    permission to write to) in the "reporting.csv.outputdir" setting. This
    will cause a .csv file to be created in that directory whenever a report
    is run.
    NOTE 2: If you set the "reporting.csv.email" setting to true, the .csv
    report results will be included with any report results that are
    emailed.
    NOTE 3: The CSV results will include all of the report information in
    the the .csv... including the header information any output from any
    subreports. That additional information may not always be desireable in
    the CSV results, so if you find the format of the .csv to not be what
    you need or too difficult to work with, you might want to consider
    creating a new report where there results/output are more optimized for
    .csv output (may without any header or subreport information).
    NOTE 4: Regardless of whether csv output is enabled or not, the
    standard PDFs results will always be generated.
    NOTE 5: The CSV results are not accessible through the GUI, but instead
    are accessible by looking in the directory you specify via the
    "reporting.csv.outputdir" property ... or via any report result emails
    if the "reporting.csv.email" property is set to true.
    NOTE 6: Just FYI: That "reporting.pdf.outputdir" property that you will
    also see in the "obj-component.JasperReportingComponent.properties" file
    is if you want to have the PDF results to be placed in a directory on
    the server. (PDF results will always be accessible via the GUI
    regardless of this setting.)
    bweiner12345
    bweiner12345's Profile: http://forums.novell.com/member.php?userid=55576
    View this thread: http://forums.novell.com/showthread.php?t=428324

Maybe you are looking for

  • Install EBS on local disk from remote win 2003? Can't pass file space check

    I have a portable 250G hard disk on my poor performance win xp,I want to install EBS 12 on my portable hard disk,but I xp system's performance is poor,so I connect to a fine performance win 2003 through mstsc and I can access my 250G hard disk from r

  • How to DISABLE SSP server to E10000 question on boot

    I have installed Solaris 8 on several systems -- E250, E450 and ultra 5. During a boot, there is a question that is asked -- is this a spp server for E10000 system? I cannot find documentation to disable the asking of this question or to give some fi

  • How do the Message mapping below issue

    Hi all.         I am doing interface is Siebel to SAP Customer Creation and Update. While mapping source side Siebel pass the Customer Account Group are Sold to Party, Goods Recipient, Payer and Bill to Party based on these parameters .My Target side

  • Error when open document

    Dear All Experts, This following vb6 code in B1 2007 PL49 version is running but give error when I try to open SO document form : Public Sub process_139(ByVal FormUID As String, pVal As SAPbouiCOM.ItemEvent, BubbleEvent As Boolean) Dim KeyField As St

  • Why won't mail remember my password in os mavericks?

    Since upgrading to Mavericks, if I quit mail I have to enter my password when I restart mail. Going into preferences and typing the password, and making sure I save does not work, when you page away and come back the password is gone. Any ideas ?