Solved

List and remove a item in Calendar

Posted on 2016-10-16
4
25 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
This article will help you understand what HashTables are and how to use them in PowerShell.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

759 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

19 Experts available now in Live!

Get 1:1 Help Now