{"id":1988,"date":"2017-01-04T20:55:42","date_gmt":"2017-01-04T20:55:42","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=1988"},"modified":"2019-05-02T16:58:40","modified_gmt":"2019-05-02T16:58:40","slug":"delete-a-calendar-item-from-a-mailbox","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=1988","title":{"rendered":"Delete a Calendar item from a mailbox"},"content":{"rendered":"<p>If you have the need to remove a specific calendar event\/appointment from a mailbox, you can do it through Power Shell or Exchange Management Shell.<\/p>\n<ol>\n<li style=\"list-style-type: none\">\n<ol>\n<li data-aria-posinset=\"1\" data-aria-level=\"2\">Open PowerShell or EMS<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<ol>\n<li style=\"list-style-type: none\">\n<ol>\n<li data-aria-posinset=\"2\" data-aria-level=\"2\">If this is an O365 mailbox, you will need to connect to the O365 environment<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<ol>\n<li data-aria-posinset=\"3\" data-aria-level=\"2\">Connect to Exchange On-line\n<ol>\n<li data-aria-posinset=\"1\" data-aria-level=\"3\"><i>From the PowerShell console on an Exchange 2010 server:<\/i><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><span style=\"color: #ff6600;\"><i>$Cred = Get-Cre<\/i><i>dential<\/i><\/span><\/p>\n<p><span style=\"color: #ff6600;\"><b><i>$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri <\/i><\/b><a style=\"color: #ff6600;\" href=\"https:\/\/ps.outlook.com\/powershell\"><b><i>https:\/\/ps.outlook.com\/powershell<\/i><\/b><\/a><b><i> -Credential $cred -Authentication Basic \u2013AllowRedirection<\/i><\/b><\/span><\/p>\n<p><span style=\"color: #ff6600;\"><b><i>Import-PSSession $s<\/i><\/b><\/span><\/p>\n<ol>\n<li style=\"list-style-type: none\">\n<ol>\n<li data-aria-posinset=\"5\" data-aria-level=\"2\">You will need the username and subject of the calendar event you want to delete, then run this command: <b>\u00a0<\/b><span style=\"color: #ff6600;\"><b>Search-Mailbox -Identity cduran@company.com -SearchQuery &#8216;Subject:&#8221;Varonis Discussion&#8221;&#8216; -DeleteContent<\/b><\/span><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<ol>\n<li data-aria-posinset=\"6\" data-aria-level=\"2\">The result should look like this<\/li>\n<\/ol>\n<p><span style=\"color: #ff6600;\"><b>[PS] C:\\Windows\\system32&gt;Search-Mailbox -Identity user<\/b><a style=\"color: #ff6600;\" href=\"mailto:user@companydomain.com\"><b>@companydomain.com<\/b><\/a><b> -SearchQuery &#8216;Subject:&#8221;Varonis Discussion<\/b><b>&#8220;&#8216; -DeleteContent<\/b><\/span><\/p>\n<p><span style=\"color: #ff6600;\"><i>Creating a new session for implicit remoting of &#8220;Search-Mailbox&#8221; command&#8230;<\/i><\/span><\/p>\n<p><span style=\"color: #ff6600;\"><i>Confirm<\/i><\/span><\/p>\n<p><span style=\"color: #ff6600;\"><i>Deleting content from mailboxes user@companydomain.com<\/i><\/span><\/p>\n<p><span style=\"color: #ff6600;\"><i>[Y] Yes \u00a0[A] Yes to All \u00a0[N] No \u00a0[L] No to All \u00a0[?] Help (default is &#8220;Y&#8221;): a<\/i><\/span><\/p>\n<p><span style=\"color: #ff6600;\"><i>RunspaceId \u00a0 \u00a0 \u00a0 : b176e7ce-5e7f-4256-a0bb-508197aa2117<\/i><\/span><\/p>\n<p><span style=\"color: #ff6600;\"><i>Identity \u00a0 \u00a0 \u00a0 \u00a0 : COMPANY.NET\/TMI\/AVE Drive\/People\/Tech-Support\/Cesar Duran<\/i><\/span><\/p>\n<p><span style=\"color: #ff6600;\"><i>DisplayName \u00a0 \u00a0 \u00a0: Cesar Duran<\/i><\/span><\/p>\n<p><span style=\"color: #ff6600;\"><i>TargetMailbox \u00a0 \u00a0:<\/i><\/span><\/p>\n<p><span style=\"color: #ff6600;\"><i>TargetPSTFile \u00a0 \u00a0:<\/i><\/span><\/p>\n<p><span style=\"color: #ff6600;\"><i>Success \u00a0 \u00a0 \u00a0 \u00a0 \u00a0: True<\/i><\/span><\/p>\n<p><span style=\"color: #ff6600;\"><i>TargetFolder \u00a0 \u00a0 :<\/i><\/span><\/p>\n<p><span style=\"color: #ff6600;\"><i>ResultItemsCount : 4<\/i><\/span><\/p>\n<p><span style=\"color: #ff6600;\"><i>ResultItemsSize \u00a0: 13.05 MB (13,679,075 bytes)<\/i><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have the need to remove a specific calendar event\/appointment from a mailbox, you can do it through Power Shell or Exchange Management Shell. Open PowerShell or EMS If this is an O365 mailbox, you will need to connect to the O365 environment Connect to Exchange On-line From the PowerShell console on an Exchange [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,22,58,62,59],"tags":[],"class_list":["post-1988","post","type-post","status-publish","format-standard","hentry","category-exchange-2007","category-exchange-2010","category-exchange-2013","category-microsoft-exchange-server-2016","category-powershell"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/1988","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1988"}],"version-history":[{"count":3,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/1988\/revisions"}],"predecessor-version":[{"id":2787,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/1988\/revisions\/2787"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1988"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1988"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1988"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}