Removing a folder powershell exchange 2010

I am wondering is there a way to remove a folder of either a users mailbox or a shared mailbox with powershell. I am in a 2010 environment and have been using the search-mailbox with the advanced searchquery with no luck. Have anyone been able to remove a folder and its contents using this command.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Adam BrownSr Solutions ArchitectCommented:
It's possible to do this with the search-mailbox cmdlet using the -deletecontent switch. goes over how to do this. You would need to craft a search query that returns the folder, but once you have that is should work well for you.
timgreen7077Exchange EngineerCommented:
I don't think you can remove a folder with the search-mailbox cmdlets. I actually don't know of a way to delete folders from mailboxes in exchange using the shell. i have looked into this before and never found any true solutions using the exchange shell. i would suggest give yourself access to the mailbox and remove it that way.

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
techdriveAuthor Commented:
Thank you timgreen7077 I think you are absolutely correct. I tried this yesterday and it moved the contents in the folder but not the folder itself.
timgreen7077Exchange EngineerCommented:
sure thing.
techdriveAuthor Commented:
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

From novice to tech pro — start learning today.