Recurring calendar event

I am trying to delete a calendar event that shows up in users calendar as unreadable.
I get into his calendar via OWA, I try deleting it and it will not work.

How can I delete this single calendar event via powershell.
Can I delete by subject line.

I have trouble deleting it in OWA, so I want to use Powershell.
thanks
error
zero000koolAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nadav SolomonCommented:
Make sure the subject you insert is unique
$subject = "test123"
#####################################################################
Add-type -assembly "Microsoft.Office.Interop.Outlook" | out-null
$olFolders = "Microsoft.Office.Interop.Outlook.OlDefaultFolders" -as [type]
$outlook = new-object -comobject outlook.application
$namespace = $outlook.GetNameSpace("MAPI")
$folder = $namespace.getDefaultFolder($olFolders::olFolderCalendar)
$filter = "[SUBJECT] = '$subject'"
$folderItems = $folder.items
$folderItems.IncludeRecurrences = $true
$folderItems = $folderItems.Restrict($filter)
$folderItems | %{
    $_.subject
    $_.delete()
}  

Open in new window

0
zero000koolAuthor Commented:
Question, this is for a particular user,  I do not see where that is specified in the script.
I do not want it for ALL of exchange,  I need a recurring calendar event removed for a particular user.

thanks
0
Nadav SolomonCommented:
This script works on the clients outlook not on the exchange, the user that is configured in the outlook is the one effected.
0
Hey MSSPs! What's your total cost of ownership?

WEBINAR: Managed security service providers often deploy & manage products from a variety of solution vendors. But is this really the best approach when it comes to saving time AND money? Join us on Aug. 15th to learn how you can improve your total cost of ownership today!

zero000koolAuthor Commented:
Explain  you is this script run on the clients desktop?

I am looking for a line command that will do it at the exchange side if this can be done.

thanks
0
Nadav SolomonCommented:
This can be done on the server side but then you'll need something like ews managed api which will make things more complicated then they should for one time operation.
If you have the permissions you can configure outlook with the specific user and run the script against it.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Nadav SolomonCommented:
Glad I could help, thanks for the feedback.
0
zero000koolAuthor Commented:
No thanks for your help, it was very helpful.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.