May 1st, 2014

PowerTip: Close Open SMB File Shares with PowerShell

Doctor Scripto
Scripter

Summary: Learn how to close open SMB file shares in Windows 8.1 with Windows PowerShell.

Hey, Scripting Guy! Question How can I use Windows PowerShell to close a number of SMB file shares that I have open?

Hey, Scripting Guy! Answer Open the Windows PowerShell console with admin rights, and
          use the Close-SMBOpenFile function:

Close-SmbOpenFile

To avoid prompting, use the –Force parameter:

Close-SmbOpenFile -Force

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.