question

BalasubramanianS-8544 avatar image
BalasubramanianS-8544 asked ·

Powershell assistance

Hi,

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-supported-azure
2 comments
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@BalasubramanianS-8544


Can you please provide some more details regarding your question. When you say file share, is this an Azure File Share? Or local on-prem File Share?


When referencing the file specific actions (identifying) are these files within the Azure File Share? Or?


What's your overall goal? Are you trying to automate tasks?


Any additional details would be greatly appreciated.


Thank you!


0 Votes 0 · ·

Hi James,

I am talking about on-prem file share. I am looking out for the possibilities to identify the open file & lock file which is blocking all the users to access that shared file.

Currently we are closing the opened file & deleting the lock file via GUI. I am planning to automate this task.

Your assistance is greatly appreciated.

0 Votes 0 · ·

1 Answer

JamesTran-MSFT avatar image
JamesTran-MSFT answered ·

@BalasubramanianS-8544, 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.


2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@BalasubramanianS-8544

I just wanted to check in and see if my previous post helped answer/guide you in the right direction or if you had any other questions.

Thank you for your time!


Please let us know if any of these answers 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.

0 Votes 0 · ·

Hi James,

Thank you so much for your input & follow. Really appreciate that. I will take it up with https://techcommunity.microsoft.com/t5/powershell/ct-p/WindowsPowerShell community.

1 Vote 1 · ·