Displaying Email subjects from a particular folder

Welcome Forums General PowerShell Q&A Displaying Email subjects from a particular folder

This topic contains 1 reply, has 2 voices, and was last updated by

1 week ago.

  • Author
  • #113048

    Points: 0
    Rank: Member

    Hi Team ,

    I want to list the email subjects from the Inbox folders . I have written  a code but it is taking me only to the folder level .Can you please tell me how to display the only email subjects from the folders .Please find the below code

    $outlook = new-object -com outlook.application;

    $ns = $outlook.GetNameSpace("MAPI");

    $inbox = $ns.GetDefaultFolder(6)

    $targetfolder = $inbox.Folders

    $targetfolder |select -Property Name

    If i execute the above code am getting the below folders that exists in my inbox .My queury is how to get only the email subjects that exists in  these folders .

    Name                                                                                                                                                          —-                                                                                                                                                              folder1                                                                                                                                                        folder2                                                                                                                                                        folder3                                                                                                                                                        folder4

  • #114018

    Points: 20
    Rank: Member

    @nikhileshwar – Did you get the solution for this ? if so please share it with us which will be helpful for others else please update this thread with latest update.

You must be logged in to reply to this topic.