question

asifA-5465 avatar image
0 Votes"
asifA-5465 asked RichMatheisen-8856 answered

Query outlook powershell

Add-Type -assembly "Microsoft.Office.Interop.Outlook"

$Outlook = New-Object -ComObject Outlook.Application

$Namespace = $Outlook.GetNameSpace("MAPI")

$NameSpace.Folders.Item(2) | Select FolderPath

When I run the above I get folder path \\MyFolder - myname@domail.com

but I want to search all the folder recursive get the RECEIVED time. Please help me

windows-server-powershell
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @asifA-5465 ,

Please kindly understand under Outlook tag, we mainly focus on general issues about Outlook desktop client. Considering that your issue may be more related to windows powershell, I would add windows-server-powershell tag under your post to solve it better. Thanks for your understanding and hope your issue would be resolved soon.

0 Votes 0 ·

1 Answer

RichMatheisen-8856 avatar image
0 Votes"
RichMatheisen-8856 answered

There are plenty of examples to be found if you look for them. You can use the Outlook COM object or you can use Exchange Web Services to do this.

372093-script-to-extract-all-senders-and-subjects-of-messages-in-a-specified-mailbox
372093-script-to-extract-all-senders-and-subjects-of-messages-in-a-specified-mailbox
viewthread.cfm


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.