开发者

How to use Powershell to Monitor a specific inbox for Commands?

开发者 https://www.devze.com 2023-01-13 12:46 出处:网络
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 开发者_开

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?


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
0

精彩评论

暂无评论...
验证码 换一张
取 消