net use * /del /y
rem delete windows credentials.
rem server or 192.168.1.10 is your NAS Server Address
cmdkey /delete:server
cmdkey /delete:192.168.1.10
rem Restart Workstation Service
net stop Workstation /y
net start Workstation
server 是待删除共享的电脑名称
192.168.1.10 是待删除共享的电脑IP
复制以上代码到txt 并另存为.bat文件 运行即可