Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to make a script that closes open files in our storage.

I can do it with compmgmt.msc, connecting to the storage as a remote computer, then I go to "System Tools" --> "Shared Folders" --> "Open Files".

Is there a Command-line interface for Computer Managment MMC?

share|improve this question
up vote 2 down vote accepted

The openfiles command line works in the same way. You can use it without argument to get a list of open files (sadly, the tool is hard-coded to truncate the output so it might be a bit touch and go if you have long file path).

You can then use the openfiles /disconnect (file) command to disconnect a specific file.

Edit: you can do better with powershell.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.