Solved

List and remove a item in Calendar

Posted on 2016-10-16
4
33 Views
Last Modified: 2016-10-17
How to use powershell to list and remove a item in Exchange 2010 calendar ?

Thx
0
Comment
Question by:AXISHK
  • 2
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
Niten Kumar earned 500 total points
ID: 41846266
To search in single mailbox

search-mailbox -identity userA -searchquery "Kind:meetings and Subject:Subject of meeting and from:User@domain.com" -targetmailbox Adminmailbox -TargetFolder "SearchData" -logonly -loglevel full

To delete items from Single mailbox

search-mailbox -identity userA -searchquery "Kind:meetings and Subject:Subject of meeting and from:User@domain.com" -targetmailbox Adminmailbox -TargetFolder "SearchData" -loglevel full -DeleteContent

To search items for all mailboxes

Get-Mailbox -ResultSize Unlimited | search-mailbox -searchquery "Kind:meetings and Subject:Subject of meeting and from:User@domain.com" -targetmailbox Adminmailbox -TargetFolder "SearchData" -logonly -loglevel full

To delete items from all mailboxes

Get-Mailbox -ResultSize Unlimited | search-mailbox -searchquery "Kind:meetings and Subject:Subject of meeting and from:User@domain.com" -targetmailbox Adminmailbox -TargetFolder "SearchData" -loglevel full –DeleteContent
0
 
LVL 6

Expert Comment

by:Niten Kumar
ID: 41846276
0
 

Author Comment

by:AXISHK
ID: 41847568
Run the below powershell but I can't see any item in the target folder of the administrator mailbox. Any idea ?



[PS] C:\Windows\system32>search-mailbox -identity john -searchquery "Kind:meetings" -targetmailbox administrator -TargetFolder "Target" -loglevel full


RunspaceId       : a6641cd4-7bea-4774-976a-2a166e867ac4
Identity         : energy.com/Hong Kong/John Leung
DisplayName      : John Leung
TargetMailbox    : energy.com/Service Account/Administrator
TargetPSTFile    :
Success          : True
TargetFolder     : \Target\John-10/18/2016 9:15:01 AM
ResultItemsCount : 27
ResultItemsSize  : 210.9 KB (215,983 bytes)
0
 

Author Closing Comment

by:AXISHK
ID: 41847591
Find it, Thx
0

Featured Post

The curse of the end user strikes again      

You’ve updated all your end user’s email signatures. Hooray! But guess what? They’re playing around with the HTML, adding stupid taglines and ruining the imagery. Find out how you can save your signatures from end users today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
In this video we show how to create a User Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Mailb…
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now