断开所有的SMB连接的批处理

时间:2021-12-06 05:33:44

备用

@ECHO OFF

ECHO ===Check how many SMB shares that already connected===

net use

ECHO ===Disconnect them all without asking for permission===

net use * /D /y

ECHO ===Hit Enter to continue===

set /p DUMMY=Hit ENTER to continue...

  • 如何断开SMB连接并避免等待用户输入Yes.
  • 如何设置等待Enter键输入之后再退出, 给运行批处理的用户一个查看运行结果的机会.
  • 如何避免命令被显示出来.