【发布时间】:2021-04-27 05:06:38
【问题描述】:
我需要创建一个 Powershell 脚本来删除 User Site 上的 Outlook 约会,而不是使用 Exchange 命令行管理程序。我已经制作了一个脚本,它在User Site 上创建了一个Appointment,但我没有找到太多关于在User Site 上删除Appointments 的信息。
这是我已经尝试过的:
-
在
User Site上创建Appointment(也许在这个函数中可以反转一些东西?)$outlook = new-object -comObject Outlook.Application $olNamespace = $outlook.GetNamespace("MAPI") $calendar = $olNamespace.Folders.Item("$Kalender") $olAppointmentItem = 1 $termin = $calendar.Items.Add("IPM.Appointment") $termin.start = ($Date) $termin.duration = ( 60 * 24 ) $termin.subject = "Closed" $termin.ReminderSet = $False $termin.Categories = "Closed" $result = $termin.save() -
我在这里尝试使用 Exchange 命令行管理程序(但这不是我正在寻找的解决方案..)
Search-Mailbox -Identity "User" -SearchQuery {Subject:"Test" AND Send:"04/20/2020"} New-ComplianceSearch -Name "RemoveCalendar1" -ExchangeLocation All -ContentMatchQuery "'calendar subject line'"
感谢您的帮助!
【问题讨论】:
标签: powershell