![]() Get-SmbOpenFile | Where-Object -Property sharerelativepath -match ".XLSX" | Close-SmbOpenFile -Force If you want to close one or more files that are open and that match the file extension ".XLSX". If you want to close all open files on your file server: Get-SmbOpenFile | Close-SmbOpenFile Get-SmbOpenFile | Where-Object -Property sharerelativepath -match ".XLSX"Īfter finding your problem file in the results, you can then close the file by the fileID. ![]() ![]() If you know an Excel file is the issue, you can narrow your search for all open files with a. The files will display along with the following table headers FileId SessionId Path ShareRelativePath ClientComputerName ClientUserName Use Get-SmbOpenFile to display all of the open files on your file server. Logged into your file server, start PowerShell. Get-SmbOpenFile and Close-SmbOpenFile will get the job done for you.
0 Comments
Leave a Reply. |