是否有办法在升级时使用Powershell来清理/释放服务器上的文件锁?我们有其他系统通过网络连接到服务器的共享资源,一些文件报告为锁定,这扰乱了我们的自动升级过程
是否有任何方法在升级之前运行Powershell脚本并关闭与服务器的所有网络连接?
谢谢!
发布于 2016-04-27 13:42:54
您可以将下面的行抛到Powershell脚本中,并在停机窗口开始之前运行它。这将杀死所有文件共享会话。
# The /y ignores the Y/N prompt that normally comes up when removing the sessions.
# This command will remove ALL sessions.
net session /delete /yhttps://serverfault.com/questions/773087
复制相似问题