Powershell assistance

Balasubramanian S 6 Reputation points


I just want to understand if this can be achieved via powershell & if possible how I could achieve it.

Identify the DFS share path of file share provided by the user.

Connect to that vfiler using compmgmt.msc & look for the open file.

Identify the user who has opened the file.

Identify if there is a lock file (.ldb) file associated with that.

Close the open file & delete the lock file associated with that user.

Any link or guidance on this is greatly appreciated.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
26,817 questions
{count} votes

1 answer

Sort by: Most helpful
  1. JamesTran-MSFT 29,141 Reputation points Microsoft Employee

    @Balasubramanian S , thank you for the clarification.

    Since you're using an On-Prem File Share and are trying to automate the close/delete tasks for .LDB files, I'm assuming this is going to be completed through Windows PowerShell and not Azure PowerShell.

    If you're trying to automate these tasks using Windows PowerShell, you should post your question at our Microsoft PowerShell Community. However, If you're trying to use Azure PowerShell for an On-Prem File Share, we don't have any Az commands that would be able to accomplish the close/delete tasks for .LDB files.


    Please let us know if any reply/answer helped resolve your question. If so, please remember to "mark as answer" so that others in the community facing similar issues can easily find a solution.