Directory removal after mailbox database is deleted in Exchange 2013

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.

I unmounted the database.  Then used the trashcan icon to delete the database.  I received the standard message that the database file would need to be removed manually (no surprise).

I navigate to the Mailbox directory, highlight the folder for the erroneous database and hit the delete key.  I get the standard "Are you sure..." message and click 'Yes'.

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?
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.

Sumit GuptaSystem and Virtualization EngineerCommented:
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.
wroggeAuthor Commented:
That is very confusing.  YES, that did resolve the issue, however, why wouldn't a platform reboot accomplish the same results?
Sumit GuptaSystem and Virtualization EngineerCommented:
The issue is that even though the database has been removed the search/index files are still locked by the noderunner.exe process and can’t be deleted.

noderunner.exe is a child process of the Microsoft Exchange Search Host Controller (HostControllerService) service. Even I'm not sure about why it keep searching the file but Me also resolved this kind of issue like this on my server.
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

wroggeAuthor Commented:
Apparently, I have spoken too soon.

Yes, stoping the service and removing the folder was successful.  However, starting the service has caused the folders to be recreated.

As sumitgupta85 stated, it is the result of the 'search/index' files are still in use and are recreated.

So, I will need to restate my question.

How can I eliminate the erroneous mailbox database from the search/index functionality that noderunner.exe has stored within the system so the folder can be removed permanently?
Sumit GuptaSystem and Virtualization EngineerCommented:
I 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.

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
wroggeAuthor Commented:
Nice to see I am not crazy.  I'll go for CU1.  Thanks.
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.