用途:PowerSkills — Outlook 通过 Outlook COM 接口自动化邮件与日历操作,适合在 Windows 桌面环境下用 PowerShell 批量读取、检索和处理 Outlook 邮件与日程。
主要能力:列收件箱、未读、已发送邮件;按索引读取完整邮件;按主题或正文搜索;列出未来日历事件;发送邮件或保存草稿;回复邮件(可全部回复、可存草稿);列出所有邮件文件夹及计数。
使用方式:运行 .\powerskills.ps1 outlook <action> [--params]。常用动作包括 inbox、unread、sent、read、search、calendar、send、reply、folders。示例:.\powerskills.ps1 outlook unread --limit 5;.\powerskills.ps1 outlook search --query "project update" --limit 10;.\powerskills.ps1 outlook calendar --days 3。列表类动作默认条数:inbox 15、unread 20、sent 15、calendar 7 天。
输出字段:列表动作返回 index、subject、sender、sender_email、received、unread、importance、has_attachments;读取动作返回 subject、sender、sender_email、to、cc、received、body、unread、importance、attachments;日历动作返回 subject、start、end、location、organizer、is_recurring、all_day、busy_status。
适用场景:本地邮件与日程的快速查询、读取与回复草稿管理等日常办公自动化。
限制:需要已启用 COM 的桌面版 Microsoft Outlook;必须在非管理员 PowerShell 会话中运行,管理员会话无法访问用户 Outlook 配置文件。其他要求与限制资料暂未提供。