预定自动回复

预定自动回复

Outlook 仅允许自动回复单身的特定时期。特意创建自定义规则也不允许我的任务。

我想设置自动回复反复例如每天 16:00 至次日 09:00。

图像

这是我可以访问的表单的屏幕截图(请忽略具体的回复信息,它指的是另一个案例)

答案1

根据我的研究和经验,它在 OOF 设置和 Outlook 规则中不可用,您只能设置包含特定日期和时间的时间段(例如从 2021 年 10 月 25 日 12:00 到 2021 年 10 月 26 日)。

但是,您可以使用以下 PowerShell 脚本来安排任务计划程序,以下脚本供您参考(该脚本用于自动更新您邮箱的OOF设置,以便您的邮箱在今天16:00到明天9:00之间自动回复邮件):

Get-PSSession | Remove-PSSession
$username = "<Office365 Admin UPN>"
$password = ConvertTo-SecureString "<Password>" -AsPlainText -Force
$UserCredential = New-Object System.Management.Automation.PSCredential -ArgumentList ($username, $password)
Connect-ExchangeOnline -Credential $UserCredential
$users = "<User's name>"
$external = '<External OOF message or HTML codes>'
$internal = '<Internal OOF message or HTML codes>'
Set-MailboxAutoReplyConfiguration -Identity $users -AutoReplyState "Scheduled" -ExternalMessage $external -InternalMessage $Internal -StartTime (Get-Date -Hour 16 -Minute 0 -Second 0) -EndTime (((Get-Date -Hour 9 -Minute 0 -Second 0).AddDays(1))) -ExternalAudience All

笔记:在将脚本添加到任务计划程序之前,您需要安装EXO V2 模块 在您的客户端上。此后,上述参数的一些值也需要修改(例如$username$password$users$external$internal

以下是上述脚本的示例:

Get-PSSession | Remove-PSSession
$username = "[email protected]"
$password = ConvertTo-SecureString "Password" -AsPlainText -Force
$UserCredential = New-Object System.Management.Automation.PSCredential -ArgumentList ($username, $password)
Connect-ExchangeOnline -Credential $UserCredential
$users = "ivan"
$external = '<html> <body> <div></div> <div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rg b(0,0,0)"> 1 </div> </body> </html>'
$internal = '<html> <body> <div></div> <div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rg b(0,0,0)"> 1 </div> </body> </html>'
Set-MailboxAutoReplyConfiguration -Identity $users -AutoReplyState "Scheduled" -ExternalMessage $external -InternalMessage $Internal -StartTime (Get-Date -Hour 16 -Minute 0 -Second 0) -EndTime (((Get-Date -Hour 9 -Minute 0 -Second 0).AddDays(1))) -ExternalAudience All

您可以让任务计划程序在特定时间工作,但当您的客户端关闭时它可能无法工作。

答案2

感谢@Ivan_Wang 的建议这里这是我的 PowerShell 脚本版本。

相关内容