我需要使用PowerShell自动执行此任务:
请提出想法。
答案 0 :(得分:1)
这是给你一些想法。
$Outlook = New-Object -ComObject Outlook.Application
$inbox_mails = $Outlook.GetNamespace("MAPI").GetDefaultFolder('olFolderInbox').Items
foreach ($mail in $inbox_mails){
Write-Host $mail.Subject
}
对此进行扩展以获取所需的邮件并下载附件。如果将excel文件作为附件共享,则可以将其保存下来。