[玩转系统] 使用 PowerShell 设置自动回复
作者:精品下载站 日期:2024-12-14 18:08:16 浏览:14 分类:玩电脑
使用 PowerShell 设置自动回复
如何在 Exchange Server 中使用 PowerShell 为其他用户设置自动回复?用户已下班,并忘记在 Outlook 中更改其“不在办公室”。他收到了很多电子邮件,并希望随时通知内部同事和外部合作伙伴。他询问是否可以更改“外出”中的文本并启用它。在本文中,您将了解如何在 Exchange Server 中使用 PowerShell 设置自动回复。
信息
在我们的示例中,我们将了解如何获取自动回复和设置自动回复。之后,我们将显示 Microsoft Outlook 中自动回复(不在办公室)配置的屏幕截图。
获取邮箱自动回复状态
以管理员身份运行 Exchange 命令行管理程序。检查用户邮箱是否开启自动回复功能。使用 cmdlet Get-MailboxAutoReplyConfiguration。
[PS] C:\>Get-MailboxAutoReplyConfiguration -Identity "[email protected]"
RunspaceId : ecc5c541-9185-4ecb-b304-2f6a794024c9
AutoDeclineFutureRequestsWhenOOF : False
AutoReplyState : Disabled
CreateOOFEvent : False
DeclineAllEventsForScheduledOOF : False
DeclineEventsForScheduledOOF : False
EventsToDeleteIDs :
EndTime : 8/7/2020 5:00:00 PM
ExternalAudience : All
ExternalMessage :
InternalMessage :
DeclineMeetingMessage :
OOFEventSubject :
StartTime : 8/6/2020 5:00:00 PM
MailboxOwnerId : exoip.local/Company/Users/IT/James Paterson
Identity : exoip.local/Company/Users/IT/James Paterson
IsValid : True
ObjectState : Unchanged
AutoReplyState 值显示为已禁用。这意味着用户将禁用自动回复。 InternalMessage 和 ExternalMessage 为空,这意味着用户没有在文本框中填写任何文本。
阅读更多内容:获取在 Exchange 中启用了“外出”功能的用户 »
启用自动回复并设置内部和外部消息
为内部和外部发件人启用自动回复邮件。
[PS] C:\>Set-MailboxAutoReplyConfiguration -Identity "[email protected]" -AutoReplyState Enabled -InternalMessage "Internal auto-reply test." -ExternalMessage "External auto-reply test." -ExternalAudience All
[PS] C:\>Get-MailboxAutoReplyConfiguration -Identity "[email protected]"
RunspaceId : ecc5c541-9185-4ecb-b304-2f6a794024c9
AutoDeclineFutureRequestsWhenOOF : False
AutoReplyState : Enabled
CreateOOFEvent : False
DeclineAllEventsForScheduledOOF : False
DeclineEventsForScheduledOOF : False
EventsToDeleteIDs :
EndTime : 8/7/2020 5:00:00 PM
ExternalAudience : All
ExternalMessage : <html>
<body>
External auto-reply test.
</body>
</html>
InternalMessage : <html>
<body>
Internal auto-reply test.
</body>
</html>
DeclineMeetingMessage :
OOFEventSubject :
StartTime : 8/6/2020 5:00:00 PM
MailboxOwnerId : exoip.local/Company/Users/IT/James Paterson
Identity : exoip.local/Company/Users/IT/James Paterson
IsValid : True
ObjectState : Unchanged
现在我们已经了解了如何更改用户的自动回复,下一步是什么?有更多选项可以更改用户的自动回复。让我们来看看它们。
启用内部和外部消息的自动回复预定时间
从2020年8月20日10:00到2020年8月20日12:00启用预定时间和日期自动回复。
[PS] C:\>Set-MailboxAutoReplyConfiguration -Identity "[email protected]" -AutoReplyState Scheduled -StartTime "8/20/2020 10:00" -EndTime "8/20/2020 12:00" -InternalMessage "Internal auto-reply test date 20 August." -ExternalMessage "External auto-reply test date 20 August."
[PS] C:\>Get-MailboxAutoReplyConfiguration -Identity "[email protected]"
RunspaceId : ecc5c541-9185-4ecb-b304-2f6a794024c9
AutoDeclineFutureRequestsWhenOOF : False
AutoReplyState : Scheduled
CreateOOFEvent : False
DeclineAllEventsForScheduledOOF : False
DeclineEventsForScheduledOOF : False
EventsToDeleteIDs :
EndTime : 8/20/2020 12:00:00 PM
ExternalAudience : All
ExternalMessage : <html>
<body>
External auto-reply test date 20 August.
</body>
</html>
InternalMessage : <html>
<body>
Internal auto-reply test date 20 August.
</body>
</html>
DeclineMeetingMessage :
OOFEventSubject :
StartTime : 8/20/2020 10:00:00 AM
MailboxOwnerId : exoip.local/Company/Users/IT/James Paterson
Identity : exoip.local/Company/Users/IT/James Paterson
IsValid : True
ObjectState : Unchanged
删除自动回复中的时间范围
通过删除时间安排来编辑自动回复并编辑内部消息。
[PS] C:\>Set-MailboxAutoReplyConfiguration -Identity "[email protected]" -AutoReplyState Enabled -InternalMessage "Internal auto-reply test."
[PS] C:\>Get-MailboxAutoReplyConfiguration -Identity "[email protected]"
RunspaceId : ecc5c541-9185-4ecb-b304-2f6a794024c9
AutoDeclineFutureRequestsWhenOOF : False
AutoReplyState : Enabled
CreateOOFEvent : False
DeclineAllEventsForScheduledOOF : False
DeclineEventsForScheduledOOF : False
EventsToDeleteIDs :
EndTime : 8/7/2020 5:00:00 PM
ExternalAudience : All
ExternalMessage : <html>
<body>
External auto-reply test date 20 August.
</body>
</html>
InternalMessage : <html>
<body>
Internal auto-reply test.
</body>
</html>
DeclineMeetingMessage :
OOFEventSubject :
StartTime : 8/6/2020 5:00:00 PM
MailboxOwnerId : exoip.local/Company/Users/IT/James Paterson
Identity : exoip.local/Company/Users/IT/James Paterson
IsValid : True
ObjectState : Unchanged
清除并禁用自动回复中的外部消息
清除并禁用自动回复中的外部消息。
[PS] C:\>Set-MailboxAutoReplyConfiguration -Identity "[email protected]" -AutoReplyState Enabled -InternalMessage "Internal auto-reply test." -ExternalMessage $null -ExternalAudience None
[PS] C:\>Get-MailboxAutoReplyConfiguration -Identity "[email protected]"
RunspaceId : ecc5c541-9185-4ecb-b304-2f6a794024c9
AutoDeclineFutureRequestsWhenOOF : False
AutoReplyState : Enabled
CreateOOFEvent : False
DeclineAllEventsForScheduledOOF : False
DeclineEventsForScheduledOOF : False
EventsToDeleteIDs :
EndTime : 8/7/2020 5:00:00 PM
ExternalAudience : None
ExternalMessage :
InternalMessage : <html>
<body>
Internal auto-reply test.
</body>
</html>
DeclineMeetingMessage :
OOFEventSubject :
StartTime : 8/6/2020 5:00:00 PM
MailboxOwnerId : exoip.local/Company/Users/IT/James Paterson
Identity : exoip.local/Company/Users/IT/James Paterson
IsValid : True
ObjectState : Unchanged
更改外部消息并仅对联系人启用
保留内部消息。仅需要为他的联系人列表更改和配置外部消息。
[PS] C:\>Set-MailboxAutoReplyConfiguration -Identity "[email protected]" -AutoReplyState Enabled -ExternalMessage "External auto-reply test only contacts." -ExternalAudience Known
[PS] C:\>Get-MailboxAutoReplyConfiguration -Identity "[email protected]"
RunspaceId : ecc5c541-9185-4ecb-b304-2f6a794024c9
AutoDeclineFutureRequestsWhenOOF : False
AutoReplyState : Enabled
CreateOOFEvent : False
DeclineAllEventsForScheduledOOF : False
DeclineEventsForScheduledOOF : False
EventsToDeleteIDs :
EndTime : 8/7/2020 6:00:00 PM
ExternalAudience : Known
ExternalMessage : <html>
<body>
External auto-reply test only contacts.
</body>
</html>
InternalMessage : <html>
<body>
Internal auto-reply test.
</body>
</html>
DeclineMeetingMessage :
OOFEventSubject :
StartTime : 8/6/2020 6:00:00 PM
MailboxOwnerId : exoip.local/Company/Users/IT/James Paterson
Identity : exoip.local/Company/Users/IT/James Paterson
IsValid : True
ObjectState : Unchanged
禁用自动回复
禁用自动回复但保留您已配置的消息。您可以在下次启用自动回复,而无需再次输入文本。
[PS] C:\>Set-MailboxAutoReplyConfiguration -Identity "[email protected]" -AutoreplyState Disabled
[PS] C:\>Get-MailboxAutoReplyConfiguration -Identity "[email protected]"
RunspaceId : ecc5c541-9185-4ecb-b304-2f6a794024c9
AutoDeclineFutureRequestsWhenOOF : False
AutoReplyState : Disabled
CreateOOFEvent : False
DeclineAllEventsForScheduledOOF : False
DeclineEventsForScheduledOOF : False
EventsToDeleteIDs :
EndTime : 8/7/2020 6:00:00 PM
ExternalAudience : Known
ExternalMessage : <html>
<body>
External auto-reply test only contacts.
</body>
</html>
InternalMessage : <html>
<body>
Internal auto-reply test.
</body>
</html>
DeclineMeetingMessage :
OOFEventSubject :
StartTime : 8/6/2020 6:00:00 PM
MailboxOwnerId : exoip.local/Company/Users/IT/James Paterson
Identity : exoip.local/Company/Users/IT/James Paterson
IsValid : True
ObjectState : Unchanged
禁用自动回复并清除内部和外部消息
禁用自动回复并清除内部和外部自动回复消息。
[PS] C:\>Set-MailboxAutoReplyConfiguration -Identity "[email protected]" -AutoReplyState Disabled -ExternalAudience All -ExternalMessage $null -InternalMessage $null
[PS] C:\>Get-MailboxAutoReplyConfiguration -Identity "[email protected]"
RunspaceId : ecc5c541-9185-4ecb-b304-2f6a794024c9
AutoDeclineFutureRequestsWhenOOF : False
AutoReplyState : Disabled
CreateOOFEvent : False
DeclineAllEventsForScheduledOOF : False
DeclineEventsForScheduledOOF : False
EventsToDeleteIDs :
EndTime : 8/7/2020 6:00:00 PM
ExternalAudience : All
ExternalMessage :
InternalMessage :
DeclineMeetingMessage :
OOFEventSubject :
StartTime : 8/6/2020 6:00:00 PM
MailboxOwnerId : exoip.local/Company/Users/IT/James Paterson
Identity : exoip.local/Company/Users/IT/James Paterson
IsValid : True
ObjectState : Unchanged
我希望这可以帮助您在 Exchange Server 中使用 PowerShell 设置自动回复。
继续阅读:在 Exchange 中搜索邮件跟踪日志 »
结论
在本文中,您学习了如何使用 PowerShell 设置自动回复。首先,获取用户的自动回复状态,然后编辑配置。您不仅看到了一种调整自动回复的选项,而且还看到了更多的变化。 Microsoft 编写了有关邮箱自动回复配置的有用文档。
如果您喜欢本文,您可能还会喜欢从 Exchange 用户邮箱中搜索和删除电子邮件。不要忘记关注我们。
猜你还喜欢
- 03-30 [玩转系统] 如何用批处理实现关机,注销,重启和锁定计算机
- 02-14 [系统故障] Win10下报错:该文件没有与之关联的应用来执行该操作
- 01-07 [系统问题] Win10--解决锁屏后会断网的问题
- 01-02 [系统技巧] Windows系统如何关闭防火墙保姆式教程,超详细
- 12-15 [玩转系统] 如何在 Windows 10 和 11 上允许多个 RDP 会话
- 12-15 [玩转系统] 查找 Exchange/Microsoft 365 中不活动(未使用)的通讯组列表
- 12-15 [玩转系统] 如何在 Windows 上安装远程服务器管理工具 (RSAT)
- 12-15 [玩转系统] 如何在 Windows 上重置组策略设置
- 12-15 [玩转系统] 如何获取计算机上的本地管理员列表?
- 12-15 [玩转系统] 在 Visual Studio Code 中连接到 MS SQL Server 数据库
- 12-15 [玩转系统] 如何降级 Windows Server 版本或许可证
- 12-15 [玩转系统] 如何允许非管理员用户在 Windows 中启动/停止服务
取消回复欢迎 你 发表评论:
- 精品推荐!
-
- 最新文章
- 热门文章
- 热评文章
[影视] 黑道中人 Alto Knights(2025)剧情 犯罪 历史 电影
[古装剧] [七侠五义][全75集][WEB-MP4/76G][国语无字][1080P][焦恩俊经典]
[实用软件] 虚拟手机号 电话 验证码 注册
[电视剧] 安眠书店/你 第五季 You Season 5 (2025) 【全10集】
[电视剧] 棋士(2025) 4K 1080P【全22集】悬疑 犯罪 王宝强 陈明昊
[软件合集] 25年6月5日 精选软件22个
[软件合集] 25年6月4日 精选软件36个
[短剧] 2025年06月04日 精选+付费短剧推荐33部
[短剧] 2025年06月03日 精选+付费短剧推荐25部
[软件合集] 25年6月3日 精选软件44个
[剧集] [央视][笑傲江湖][2001][DVD-RMVB][高清][40集全]李亚鹏、许晴、苗乙乙
[电视剧] 欢乐颂.5部全 (2016-2024)
[电视剧] [突围] [45集全] [WEB-MP4/每集1.5GB] [国语/内嵌中文字幕] [4K-2160P] [无水印]
[影视] 【稀有资源】香港老片 艺坛照妖镜之96应召名册 (1996)
[剧集] 神经风云(2023)(完结).4K
[剧集] [BT] [TVB] [黑夜彩虹(2003)] [全21集] [粤语中字] [TV-RMVB]
[实用软件] 虚拟手机号 电话 验证码 注册
[资源] B站充电视频合集,包含多位重量级up主,全是大佬真金白银买来的~【99GB】
[影视] 内地绝版高清录像带 [mpg]
[书籍] 古今奇书禁书三教九流资料大合集 猎奇必备珍藏资源PDF版 1.14G
[电视剧] [突围] [45集全] [WEB-MP4/每集1.5GB] [国语/内嵌中文字幕] [4K-2160P] [无水印]
[剧集] [央视][笑傲江湖][2001][DVD-RMVB][高清][40集全]李亚鹏、许晴、苗乙乙
[电影] 美国队长4 4K原盘REMUX 杜比视界 内封简繁英双语字幕 49G
[电影] 死神来了(1-6)大合集!
[软件合集] 25年05月13日 精选软件16个
[精品软件] 25年05月15日 精选软件18个
[绝版资源] 南与北 第1-2季 合集 North and South (1985) /美国/豆瓣: 8.8[1080P][中文字幕]
[软件] 25年05月14日 精选软件57个
[短剧] 2025年05月14日 精选+付费短剧推荐39部
[短剧] 2025年05月15日 精选+付费短剧推荐36部
- 最新评论
-
- 热门tag