Get open files on a remote server with powershell

I needed to send a list of open files from our file server to the helpdesk so they could contact the users that were still using the old systems. I wanted to give them something other than a screen shot so I went digging for a powershell script. I found this which uses openfile.exe but within powershell pipes the output to a nice grid view.

openfiles /Query /S 2K12R2 /FO CSV /V | ConvertFrom-Csv | Out-GridView

Source: Get open files on a remote server – It For DummiesIt For Dummies

I took it and tweaked it to a file so the helpdesk could open it in excel

openfiles /Query /S Server /FO CSV /V | out-file c:\temp\files.csv

2 comments

  1. Pingback: #PowerShell Weekly – The Top New PowerShell Content of the Week 20150818 @ Scott Ge
  2. Pingback: #PowerShell Weekly 20150818 – The Top New PowerShell Content of the Week | Scott Ge

Leave a Reply

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