gpt4 book ai didi

powershell - 使用PowerShell搜索Outlook电子邮件

转载 作者:行者123 更新时间:2023-12-02 23:24:02 25 4
gpt4 key购买 nike

我在Outlook中搜索电子邮件时遇到问题。

这有效:

Add-Type -assembly "Microsoft.Office.Interop.Outlook"
$Outlook = New-Object -comobject Outlook.Application
$namespace = $Outlook.GetNameSpace("MAPI")
$e=$Outlook.AdvancedSearch("Inbox","urn:schemas:httpmail:subject='RECHERCHE QUI MARCHE'",$False,'test')
$e.results

给我结果好。

但是,如果我更改范围,它将无法正常工作。
PS C:\Users\etarai> $e=$Outlook.AdvancedSearch('\\xx@xx.com\Éléments supprimés',"urn:schemas:httpmail:subject='RECHERCHE QUI MARCHE'",$False,'test')

其中“\\ xx@xx.com \Élémentssupprimés”是FolderPath。
在msdn中,作用域应该是带有folderpath的字符串

Scope Type: System.String

The scope of the search. For example, the folder path of a folder. It is recommended that the folder path is enclosed within single quotes. Otherwise, the search might not return correct results if the folder path contains special characters including Unicode characters. To specify multiple folder paths, enclose each folder path in single quotes and separate the single quoted folder paths with a comma.



如何搜索已删除的电子邮件,已发送的电子邮件或存档?
您有找到范围的解决方案吗?当我尝试将folderpath放在作用域中时,它不起作用。

另一个问题,是否有可能看到研究何时完成?

最佳答案

我找到答案了!
感谢您的提示sodawillow!

对于具有folderpath的作用域
双引号和单引号:

“'\ xx@xx.com \已删除的邮件'”。可以与pst文件中的存档一起使用:)

关于powershell - 使用PowerShell搜索Outlook电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41617719/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com