powershell - Powershell搜索数十个365共享邮箱
问题描述
我试图想出一种方法,我可以编写脚本来搜索大约 40 个我具有完全访问权限的共享邮箱,例如特定字符串“subjet:hello”我正在创建会话:
$O365Cred = Get-Credential
$O365Session = New-PSSession –ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $O365Cred -Authentication Basic -AllowRedirection
Set-ExecutionPolicy RemoteSigned -force
Import-PSSession $O365Session
Search-Mailbox -Identity "one.of.them@cbla.onmicrosoft.com" -SearchQuery 'Subject:hello'
我遇到错误:需要目标邮箱或 .pst 文件路径。
我不知道这里发生了什么,我需要将所有共享邮箱下载为 pst 吗?
任何帮助将不胜感激,因为谷歌对我帮助不大
解决方案
推荐阅读
- powershell - FritzBox 配置导出:cURL 到 Invoke-Webrequest
- google-sheets - 如何在电子表格的 IMPORTRANGE() 中插入 URL
- security - 从 getServerSideProps 调用时如何调用 getSession?
- html - 使用 CSS 在 div 上添加过渡效果
- javascript - 如何从 Json 对象 React Native 中删除数组
- python - 为什么 CSS 不通过 django 中的实时重新加载来更新
- java - 如何将值从我的 REST 端点传递到我的 PostgreSQL time_bucket_gapfill() 函数
- x86 - 为什么 clflush 在 x86 中是非特权指令?
- java - RecyclerView 不显示来自数据库的数据
- sqlite - Sqlite FTS5 与 Electron 应用程序中的任何内容都不匹配