如何使用Powershell监视命令的特定收件箱? [英] How to use Powershell to Monitor a specific inbox for Commands?
本文介绍了如何使用Powershell监视命令的特定收件箱?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想设置功能,使Powershell脚本可以访问特定邮箱中的电子邮件.然后它将解析每封电子邮件,以与一组特定的用户进行对话.用作可以通过电子邮件进行交互的系统.怎么把它拔掉?
I would like to set up functionality where a powershell script would access the email in a specific mailbox. It would then parse each email to engage in dialog with a specific set of users. To serve as a system that could be interacted with through email. How could this be pulled off?
推荐答案
如果要从安装了Outlook的客户端运行此程序,则以下是一个很好的起点(不需要EWS).
If you want to run this from a client with Outlook installed then the following is a good starting point (EWS is not required).
$olFolderInbox = 6
$outlook = new-object -com outlook.application;
$mapi = $outlook.GetNameSpace("MAPI");
$inbox = $mapi.GetDefaultFolder($olFolderInbox)
$inbox | gm
这篇关于如何使用Powershell监视命令的特定收件箱?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文