Suppose, We are in the process of migrating from Exchange 2007 to Exchange 2013. All platforms have been built and are running as expected.
During the initial creation of the mailbox databases, one was created that will no longer be used.
First, unmounted the database. Then delete the database. You will received the standard message that the database file would need to be removed manually (no surprise).
Navigate to the Mailbox directory, highlight the folder for the erroneous database and hit the delete key. Click Yes for the standard “Are you sure…” message.
Much to my surprise, I get a warning that ‘noderunner.exe’ is accessing files in this folder. Why? I had the management console remove all references so I should be able to delete this. I have rebooted to try and clear any active processes, but ‘noderunner.exe’ grabs it immediately.
As such, I can not remove this folder that Microsoft states I can. What is the trick that is not documented to allow for the deletion of this folder?
Answer:
To clear the file lock you can restart the HostControllerService service using PowerShell.
PS C:> Restart-Service HostControllerService
You should now be able to delete the files and folders successfully.
Or you can also do service stop > Delete file > start service from Run> Services.msc
Stop-Service HostControllerService.
Delete the file.
Start-Service HostControllerService.
Also, It can be generated again if you create a database or database copy in that path again.
This looks like a Microsoft bug.
I my case it didn’t came back. Some says that its fixed in exchange 2013 cumulative update 1. So i suggest you to update your server with cumulative updates.