Forum Discussion
Mateusz710
Jul 20, 2020Copper Contributor
Delete Folder
Hello, I have folder with custom name in Exchange Contacts? How to delete this folder via Powershell?
VasilMichev
Jul 20, 2020MVP
PowerShell doesn't deal with item/folder level operations. For that, you would need to use the EWS/Graph API. Both of these can be called via PowerShell if you prefer.
Mateusz710
Jul 20, 2020Copper Contributor
VasilMichev thanks for information. Could you please send me some tutorial or sample code? I have not dealt with work at the API level.
- harveer singhJul 20, 2020Iron Contributor
Mateusz710 : Continuing from Where VasilMichev left off, hopefully this should be a good starting point (for now) : https://docs.microsoft.com/en-gb/archive/blogs/exovoice/delete-a-list-of-folders-from-specific-mailboxes-with-ews-managed-api-2-2-and-application-impersonation-in-exchange-online