Tuesday, August 9, 2011

Finding locked files with OpenFiles

OpenFiles is a command line executable that has been around since XP. It isn't a powershell command so it doesn't produce nice PSObjects to play with, just raw text.

To find a particular file in the daunting amount of output, I do this:

OpenFiles | %{ if ($_.contains("search string")) { $_ } } 

No comments:

Post a Comment