fileunlock_tool

The purpose of this script is to unlock a file located on a shared folder. The server which hosting the shared folder is configured in the variable $nas_server
This script works on Windows 2008/Windows 7 and uses the tool “openfiles.exe” (http://technet.microsoft.com/en-us/library/bb490961.aspx)
The script users will need, at least, to be a member of the “Power users” group on the nas server

To avoid any problems regarding the length of the paths, please check and set your powershell console screen width to “500” :

fileunlock_prop

Script :

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.