{"id":2713,"date":"2019-01-15T21:04:09","date_gmt":"2019-01-15T21:04:09","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=2713"},"modified":"2019-01-15T21:04:44","modified_gmt":"2019-01-15T21:04:44","slug":"delete-all-calendar-events-from-a-mailbox","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=2713","title":{"rendered":"Delete all Calendar events from a mailbox"},"content":{"rendered":"<p>Connect to O365 using\u00a0powershell\u00a0first<\/p>\n<p>&nbsp;<\/p>\n<ol style=\"font-weight: 400;\">\n<li data-aria-posinset=\"1\" data-aria-level=\"1\">Open PowerShell or EMS<\/li>\n<li data-aria-posinset=\"2\" data-aria-level=\"1\">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=\"1\">Connect to Exchange On-line\n<ol>\n<li data-aria-posinset=\"1\" data-aria-level=\"2\"><i>From the PowerShell console on an Exchange 2010 server:<\/i><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><span style=\"color: #00ff00;\"><strong><i>$Cred = Get-Cre<\/i><i>dential<\/i>\u00a0<\/strong><\/span><\/p>\n<p><span style=\"color: #00ff00;\"><strong><i>$s = New-PSSession\u00a0-ConfigurationName\u00a0Microsoft.Exchange\u00a0-ConnectionUri\u00a0<\/i><a style=\"color: #00ff00;\" href=\"https:\/\/ps.outlook.com\/powershell\"><i>https:\/\/ps.outlook.com\/powershell<\/i><\/a><i>\u00a0-Credential $cred -Authentication Basic \u2013AllowRedirection<\/i>\u00a0<\/strong><\/span><\/p>\n<p><span style=\"color: #00ff00;\"><strong><i>Import-PSSession\u00a0$s<\/i>\u00a0<\/strong><\/span><\/p>\n<p>&nbsp;<\/p>\n<p>Then run this command in\u00a0powershell:<\/p>\n<p><span style=\"color: #00ff00;\"><strong>Search-Mailbox -identity \u201cUsersMailbox\u201d -SearchQuery\u00a0kind:meetings\u00a0-DeleteContent\u00a0<\/strong><\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Connect to O365 using\u00a0powershell\u00a0first &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 Exchange 2010 server: $Cred = Get-Credential\u00a0 $s = New-PSSession\u00a0-ConfigurationName\u00a0Microsoft.Exchange\u00a0-ConnectionUri\u00a0https:\/\/ps.outlook.com\/powershell\u00a0-Credential $cred -Authentication Basic \u2013AllowRedirection\u00a0 Import-PSSession\u00a0$s\u00a0 &nbsp; Then run this command in\u00a0powershell: Search-Mailbox [&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,58,62,73,60,59],"tags":[],"class_list":["post-2713","post","type-post","status-publish","format-standard","hentry","category-exchange-2010","category-exchange-2013","category-microsoft-exchange-server-2016","category-exchange-server-2019","category-office-365","category-powershell"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2713","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=2713"}],"version-history":[{"count":3,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2713\/revisions"}],"predecessor-version":[{"id":2716,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2713\/revisions\/2716"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}