Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.