28 June 2010

Unable to delete public folder (Self recursive public folder) - 0x40680

You might get the following error when you attempt to delete a Puiblic Folder that seems to have copied itself recursively ( i.e. Public folder name is PubF1, then you have another one named PubF1 inside that Public folder and then another PubF1 sub folder inside that folder and so on...)

MapiExceptionPartialCompletion: Unable to delete folder. (hr=0x40680, ec=0)
Diagnostic context:
Lid: 18969 EcDoRpcExt2 called [length=54]
Lid: 27161 EcDoRpcExt2 returned [ec=0x0][length=49][latency=15]
Lid: 23226 --- ROP Parse Start ---
Lid: 27962 ROP: ropDeleteFolder [29]
Lid: 31418 --- ROP Parse Done ---

In order to delete the (entire) self recursive public folder, you can run:
Get-PublicFolder -recurse "\PubF1\" | Remove-PublicFolder –recurse


Alternatively, you can specify the first sub folder i.e. "\PubF1\PubF1\" and delete just the sub folders and not also the main/top level public folder.

No comments: