Delete a Calendar item from a mailbox
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 2010 server:
$Cred = Get-Credential
$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic –AllowRedirection
Import-PSSession $s
- You will need the username and subject of the calendar event you want to delete, then run this command: Search-Mailbox -Identity cduran@lifetouch.com -SearchQuery ‘Subject:”Varonis Discussion with Lifetouch”‘ -DeleteContent
- The result should look like this
[PS] C:\Windows\system32>Search-Mailbox -Identity cduran@lifetouch.com -SearchQuery ‘Subject:”Varonis Discussion with Lifetouch”‘ -DeleteContent
Creating a new session for implicit remoting of “Search-Mailbox” command…
Confirm
Deleting content from mailboxes cduran@lifetouch.com
[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is “Y”): a
RunspaceId : b176e7ce-5e7f-4256-a0bb-508197aa2117
Identity : LIFETOUCH.NET/LTI/Viking Drive/People/Tech-Support/Cesar Duran
DisplayName : Cesar Duran
TargetMailbox :
TargetPSTFile :
Success : True
TargetFolder :
ResultItemsCount : 4
ResultItemsSize : 13.05 MB (13,679,075 bytes)