{"id":2087,"date":"2017-04-14T19:20:23","date_gmt":"2017-04-14T19:20:23","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=2087"},"modified":"2017-04-14T19:21:01","modified_gmt":"2017-04-14T19:21:01","slug":"delete-a-calendar-item-from-a-mailbox-2","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=2087","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<p>&nbsp;<\/p>\n<ol>\n<li data-aria-posinset=\"1\" data-aria-level=\"2\">Open PowerShell or EMS<\/li>\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<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><em><span style=\"color: #ff0000;\">$Cred = Get-Credential\u00a0<\/span><\/em><\/p>\n<p><em><span style=\"color: #ff0000;\">$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri <a style=\"color: #ff0000;\" href=\"https:\/\/ps.outlook.com\/powershell\">https:\/\/ps.outlook.com\/powershell<\/a> -Credential $cred -Authentication Basic \u2013AllowRedirection\u00a0<\/span><\/em><\/p>\n<p><em><span style=\"color: #ff0000;\">Import-PSSession $s\u00a0<\/span><\/em><\/p>\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:\u00a0 <span style=\"color: #ff0000;\"><b>Search-Mailbox -Identity cduran@lifetouch.com -SearchQuery &#8216;Subject:&#8221;Varonis Discussion with Lifetouch&#8221;&#8216; -DeleteContent<\/b>\u00a0<\/span><\/li>\n<li data-aria-posinset=\"6\" data-aria-level=\"2\">The result should look like this<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p><b>[PS] C:\\Windows\\system32&gt;<span style=\"color: #ff0000;\">Search-Mailbox -Identity <\/span><\/b><span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"mailto:cduran@lifetouch.com\"><b>cduran@lifetouch.com<\/b><\/a><b> -SearchQuery &#8216;Subject:&#8221;Varonis Discussion with Li<\/b><b>fetouch&#8221;&#8216; -DeleteContent<\/b>\u00a0<\/span><\/p>\n<p><i>Creating a new session for implicit remoting of &#8220;Search-Mailbox&#8221; command&#8230;<\/i><\/p>\n<p>&nbsp;<\/p>\n<p><i>Confirm<\/i><\/p>\n<p><i>Deleting content from mailboxes <\/i><a href=\"mailto:cduran@lifetouch.com\"><i>cduran@lifetouch.com<\/i><\/a><\/p>\n<p><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><\/p>\n<p>&nbsp;<\/p>\n<p><i>RunspaceId\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : b176e7ce-5e7f-4256-a0bb-508197aa2117<\/i><\/p>\n<p><i>Identity\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : LIFETOUCH.NET\/LTI\/Viking Drive\/People\/Tech-Support\/Cesar Duran<\/i><\/p>\n<p><i>DisplayName\u00a0\u00a0\u00a0\u00a0\u00a0 : Cesar Duran<\/i><\/p>\n<p><i>TargetMailbox\u00a0\u00a0\u00a0 :<\/i><\/p>\n<p><i>TargetPSTFile\u00a0\u00a0\u00a0 :<\/i><\/p>\n<p><i>Success\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : True<\/i><\/p>\n<p><i>TargetFolder\u00a0\u00a0\u00a0\u00a0 :<\/i><\/p>\n<p><i>ResultItemsCount : 4<\/i><\/p>\n<p><i>ResultItemsSize\u00a0 : 13.05 MB (13,679,075 bytes)<\/i><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/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. &nbsp; 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,60,59],"tags":[],"class_list":["post-2087","post","type-post","status-publish","format-standard","hentry","category-exchange-2010","category-office-365","category-powershell"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2087","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=2087"}],"version-history":[{"count":1,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2087\/revisions"}],"predecessor-version":[{"id":2088,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2087\/revisions\/2088"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2087"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2087"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}